-
Notifications
You must be signed in to change notification settings - Fork 36
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
The "timeout" doesn't seem to be working... #7
Comments
More details Part 2:
|
Sorry for the long delay in getting back to you. Is the channel blocking or not? (see https://libssh2.org/libssh2_session_set_blocking.html) If it is not libssh2_channel_read_ex is non-blocking and does not timeout. It returns immediately with LIBSSH2_ERROR_EAGAIN if there is no data available. You can implement a timeout using the Cancelled variable. (see https://libssh2.org/libssh2_channel_read_ex.html) |
So with PR #6 I added the
libssh2_session_set_timeout
API.However, although with this PR,
SetTimeout(gDefaultSshTimeout)
is called inTSshSession.Connect
, wheregDefaultSshTimeout
is set to 30 seconds by default.But according to my tests, after 30 seconds of a command execution of no return, the expected
LIBSSH2_ERROR_TIMEOUT
error (Docs here) are not raised, not sure why...The text was updated successfully, but these errors were encountered: