Fixing issue with readstream. closing GH#15

This commit is contained in:
Chris Williams 2011-07-14 14:34:25 -04:00
parent 9dc11f730a
commit 6af40c3ebc
2 changed files with 2 additions and 3 deletions

View file

@ -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 <voodootikigod@gmail.com>",
"main": "./serialport",

View file

@ -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();
};