diff --git a/lib/serialport.js b/lib/serialport.js index 576c4d5..4ad8a76 100644 --- a/lib/serialport.js +++ b/lib/serialport.js @@ -28,7 +28,7 @@ const defaultSettings = Object.freeze({ xany: false, xoff: false, xon: false, - highWaterMark: 16 * 1024 + highWaterMark: 64 * 1024 }); const defaultSetFlags = Object.freeze({ @@ -166,7 +166,7 @@ function SerialPort(path, options, callback) { this.opening = false; this.closing = false; - this._pool = null; + this._pool = allocNewReadPool(this.settings.highWaterMark); this._kMinPoolSpace = 128; if (this.settings.autoOpen) {