-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing callback when SFTP server disconnects during sftp operation #1175
Comments
Might be because |
Here is a simple repro: https://github.com/jeffrson/ssh2-missing-cb When the server crashs in "READDIR" the callback is missing - however, if the "crash" occurs in OPENDIR the callback is called correctly. I seem to remember similar problems some time ago during delete as well (yes, in development the server crashed to often ;-)). |
@jeffrson any luck with this? Find any workarounds? It seems like I may also be experiencing this problem based on my stacktrace.
I'm running the latest ssh2 at the time of writing this (1.11.0). |
I'm seeing the same error as well on
I've gotten around this error by setting the which I assume prevents the callback from being queued. It's not ideal, but in my case the connections are created on demand and are not pooled or kept around. I believe closing the connection will also result in any open file handles being freed up. |
I have a problem with, maybe,
cleanupRequests
. Unfortunately I cannot get hold on how it works in the end.Sometimes, mostly for network reasons, or because it reboots for maintenance, an SFTP server, based on SSH2, "disappears". It could be simulated by
A client uses ssh2-promises and sometimes the promises are not rejected by disconnection, but stay pending. I tried to debug the situation and I found, that in
the callback I need is added to
sftp._requests
while another request is processed throughreq.cb(err);
. WIth other words, if cleanupRequests would be executed twice the callback is called correctly and the promises are rejected.This may sound strange - any idea why this could happen? May this be a problem in ssh2 or ssh2-promise? I couln't reproduce it so far in simple app with ssh2 alone.
The text was updated successfully, but these errors were encountered: