Error conditions not being correctly propagated
Closed this issue · 1 comments
raoulmillais commented
- Once ssh2's Connection object has emitted 'ready' we should replace RemoteControl's error handler (used during connection phase to notify callers of errors connecting) with something else that marks the RemoteControl as not connected so that subsequent exec calls do not get executed and we can inform callers of a onnection problem.
- Fix exec by not trying to send a command on the ssh2 connection if we think the connection has already closed (missing return after calling callback with an error).
- When handling stream returned from
exec
ing on the ssh2 connection we should bail early if there was error (missing return).
raoulmillais commented
FIxed by pull request #10