Closed NamamiShanker closed 2 years ago
Hi there,
Thanks for the interest.
Not seeing an issue with library here. Timeout is set at self.session.set_timeout(5000)
. This causes file transfers to timeout after 5sec. The library correctly raises ssh2.exceptions.Timeout
after 5sec of transferring.
If timeouts are not wanted, set_timeout
should not be called.
To be closed unless an issue with library is shown.
Not seeing an issue. Timeout raised correctly after set_timeout
is used.
Bug reports
I am writing a program that will upload files to a CrushFTP server through SFTP and retry on connection loss. Below is my
Connection
class for wrappingssh2-python
library, and my retry logic to resume upload on connection loss.Steps to reproduce:
Example code that produces error. The
Connection
class that wrapsssh2-python
The retry logic, where functions
_show_updates
and_set_update
are justtqdm
updation callbacks:Expected behaviour: The script should have resumed upload of the partially uploaded file.
Actual behaviour: I get a
SocketRecvError
.Additional info:
libssh2 v1.0.0
:When I run the script again, the uploading resumes without any errors. How should I handle the different errors so that the uploading of files can be resumed.