spmjs / node-scp2

[MAINTAINER WANTED] A pure javascript scp program based on ssh2.
385 stars 96 forks source link

Handle error, pass to callback #6

Closed cliffano closed 10 years ago

cliffano commented 10 years ago

This allows the client of scp2 module to handle error accordingly.

Otherwise it breaks:

events.js:72 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT at errnoException (net.js:901:11) at Object.afterConnect as oncomplete