ecto / duino

:bulb: Arduino framework for node.js
958 stars 214 forks source link

Fix hang after SIGINT in debug mode #37

Open mattness opened 11 years ago

mattness commented 11 years ago

Sending SIGINT (^c) to the process when in debug mode causes the process to (at least appear to) hang, because the serial port is still open. Instead of deleting our reference to the serialport, call its close method, and then call process.exit in the handler for the close event.