sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

Handling of 'continue' event fails critically #34

Closed jeffrson closed 3 years ago

jeffrson commented 5 years ago

The handling of 'continue' in https://github.com/jeffrson/ssh2-promise/blob/master/src/sftp.ts#L21 doesn't do what it is supposed to.

"continue" is not emitted by ssh (this.ssh), but by sftp() subsystem (which is an SFTPWrapper here). Actually it is the sftp from https://github.com/sanketbajoria/ssh2-promise/blob/master/src/sftp.ts#L39

Also, the event is called indeed just 'continue', not 'ssh:continue'.

This is critically: Once stopped because somehow continue is needed, the promise stays pending forever, because the event is missed that should resolve it.

sanketbajoria commented 4 years ago

@jeffrson

Actually ssh2-promise wrap around continue event and send ssh:continue event. It is already being handled properly. Please let me know, what issue you are facing currently

sanketbajoria commented 3 years ago

@jeffrson We have upgraded to ssh2 1.1.0 version, it has removed continue event. So now, we should not face this issue.