No requestIdleCallback in Node
This commit is contained in:
parent
b466a6b2a2
commit
938a3db094
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -149,7 +149,7 @@ class Connection {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.msgBuffer.length > 0) {
|
if (this.msgBuffer.length > 0) {
|
||||||
requestIdleCallback(() => {
|
setImmediate(() => {
|
||||||
this.send();
|
this.send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ class Connection {
|
||||||
this.reachabilityTimeout = null;
|
this.reachabilityTimeout = null;
|
||||||
|
|
||||||
if (this.msgBuffer.length > 0) {
|
if (this.msgBuffer.length > 0) {
|
||||||
requestIdleCallback(() => {
|
setImmediate(() => {
|
||||||
this.send();
|
this.send();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue