-
Notifications
You must be signed in to change notification settings - Fork 526
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
libssh2_channel_exec may return -1 when using non-blocking sockets #671
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The _libssh2_packet_askv is used to check whether there are expected messages among the messages receive from the peer. |
Thanks for this answer. But since this is quite old, I do not really remember all the researches I did at the time I opened the issue. |
When using non-blocking sockets, libssh2_channel_exec may return -1, and the channel becomes dead.
I fixed the issue by modifying the function _libssh2_packet_requirev in packet.c in libssh2 sources:
line 1393:
old code:
new code:
I'm no libssh2 developer, so maybe I do not have the whole picture. But this fixed my problem.
The text was updated successfully, but these errors were encountered: