Skip to content

Commit

Permalink
Replace setImmediate(fn) by setTimeout(fn, 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
djipco authored May 10, 2022
1 parent 4ef7835 commit 5ec54f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chrome-apps-serialport.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ SerialPort.prototype._processBuffer = function (buffer, callback) {
}

this.sending = false;
if (this._sendBufferArray.length > 0) setImmediate(this._processBuffer.bind(this));
if (this._sendBufferArray.length > 0) setTimeout(this._processBuffer.bind(this), 0);

}.bind(this));

Expand Down

0 comments on commit 5ec54f8

Please sign in to comment.