mikeal / sequest

Simplified API for SSH and SFTP similar to request.
283 stars 24 forks source link

Ensure data is in buffers before exec. Exec on 'end' instead of 'close'. #24

Closed timoxley closed 9 years ago

timoxley commented 9 years ago

Was getting seemingly totally empty responses from sequest.exec i.e. no stdout, no stderr.

Appears that the close event was being fired before the data had been flushed into the stdout/stderr buffers. This occurred intermittently, seemed to be more likely when receiving tiny responses from server e.g. output of whoami or pwd.

Not sure how to force such a race condition for a test, though all the existing tests pass.

timoxley commented 9 years ago

@mikeal bump

timoxley commented 9 years ago

:+1:

mikeal commented 9 years ago

added you to Collaborators.

jcrugzz commented 9 years ago

:+1: