From c81a9bd5f5e9799f722db9cbec9813623d4fa696 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Wed, 30 Oct 2013 15:48:10 +0100 Subject: [PATCH] fix for Issue #238 --- serialport.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serialport.js b/serialport.js index 8668e19..43938e5 100644 --- a/serialport.js +++ b/serialport.js @@ -209,6 +209,9 @@ function SerialPortFactory() { SerialPort.prototype.open = function (callback) { var self = this; + this.paused = true; + this.readable = true; + this.reading = false; factory.SerialPortBinding.open(this.path, this.options, function (err, fd) { self.fd = fd; if (err) { @@ -550,4 +553,4 @@ function SerialPortFactory() { util.inherits(SerialPortFactory, EventEmitter); -module.exports = new SerialPortFactory(); \ No newline at end of file +module.exports = new SerialPortFactory();