Uncaptured closure in SerialResponseTransport
Closed this issue · 4 comments
toarnold commented
Form time to time I get an error in line 223 of SerialResponseTransport.js. This might be caused by an issue in the underlying serial library. But this error will not be handled correctly:
if (this.serialComm) this.serialComm.close(function(err) { if (err) { this.options.logger('ERROR CLOSING SERIALPORT'); } });
this.options
didn't exist in case of invoking the callback function. It has to be captured in a closure before.
Do you accept a PR?
Apollon77 commented
Sure. PRs are welcome ;-) I will also take a look later ...
Apollon77 commented
I do not nee a PR ... fixed it hopefully. WIll publish new version soon
Apollon77 commented
1.1.3 on npm
toarnold commented
Thx!