7digital/roadrunner

Error conditions not being correctly propagated

Closed this issue · 1 comments

  1. 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.
  2. 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).
  3. When handling stream returned from execing on the ssh2 connection we should bail early if there was error (missing return).

FIxed by pull request #10