diff --git a/package.json b/package.json index 851b8b5..16e91f4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name" : "serialport", - "version" : "0.2.8", + "version" : "0.2.9", "description" : "Welcome your robotic javascript overlords. Better yet, program them!", "author": "Chris Williams ", "main": "./serialport", diff --git a/serialport.js b/serialport.js index eed3970..2da4523 100644 --- a/serialport.js +++ b/serialport.js @@ -95,12 +95,11 @@ function SerialPort(path, options) { sys.inherits(SerialPort, stream.Stream); SerialPort.prototype.close = function () { - this.readStream.close(); if (this.fd) { serialport_native.close(this.fd); this.fd = null; } - + this.readStream.destroy(); };