mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Fix serialport.close(callback) on success, small jshint cleanup
This commit is contained in:
parent
7647ad6085
commit
2bbd0a8a90
1 changed files with 2 additions and 2 deletions
|
|
@ -1,10 +1,8 @@
|
|||
/*jslint node: true */
|
||||
"use strict";
|
||||
/*global process require exports console */
|
||||
|
||||
// Copyright 2011 Chris Williams <chris@iterativedesigns.com>
|
||||
|
||||
var Buffer = require('buffer').Buffer;
|
||||
var SerialPortBinding = require("bindings")("serialport.node");
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
|
|
@ -432,6 +430,8 @@ SerialPort.prototype.close = function (callback) {
|
|||
self.readable = false;
|
||||
self.serialPoller.close();
|
||||
}
|
||||
|
||||
callback();
|
||||
});
|
||||
} catch (ex) {
|
||||
self.closing = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue