mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Fixing issue with readstream. closing GH#15
This commit is contained in:
parent
9dc11f730a
commit
6af40c3ebc
2 changed files with 2 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue