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

Uncatchable rejected promise #73

Open jeffrson opened 2 years ago

jeffrson commented 2 years ago

When the SFTP server disconnects during ("extended") connection handshake (requesting the sftp subsystem) the client application stops due to unhandled promise rejection. The promise in question is rejected in https://github.com/sanketbajoria/ssh2-promise/blob/master/src/sshConnection.ts#L80

I created a pull request that should fix the problem: https://github.com/sanketbajoria/ssh2-promise/pull/72 - it enables the application to catch the rejected promise, which was otherwise impossible.

sanketbajoria commented 2 years ago

@jeffrson This pull request has been merged. Can you please verify, if things are working good

sebasptsch commented 2 years ago

@sanketbajoria Does a new release need to be created?

sanketbajoria commented 2 years ago

@sebasptsch Published a new release https://www.npmjs.com/package/ssh2-promise/v/1.0.3