-
Notifications
You must be signed in to change notification settings - Fork 589
If SFTP fails to initialize, do not busy loop waiting for IO to happen #720
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n, instead return to the caller, and close the connection at a later point
vszakats
reviewed
Apr 15, 2023
vszakats
reviewed
Apr 15, 2023
vszakats
reviewed
Apr 15, 2023
vszakats
reviewed
Apr 15, 2023
vszakats
reviewed
Apr 15, 2023
vszakats
reviewed
Apr 15, 2023
@libssh2/dev-team This is technically ready to merge. Any objection, opinion or review if we are good to go along with it? |
vszakats
reviewed
Apr 26, 2023
Thank you, merged now. |
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
libssh2#720) Currently SFTP's init will busy loop waiting for the channel to close, even if the underlying transport returns EAGAIN. While this works for sockets, it might not work out if you have a different transport that needs to do some additional processing on the side. Integration-patches-by: Viktor Szakats
willco007
pushed a commit
that referenced
this pull request
Sep 27, 2024
The `send_existing()` function allows partially sent packets to be sent fully before any further packets are sent. Originally this returned `LIBSSH2_ERROR_BAD_USE` when a different caller or thread tried to send an existing packet created by a different caller or thread causing the connection to disconnect. Commit 33dddd2 removed the return allowing any caller to continue sending another caller's packet. This caused connection instability as discussed in #1397 and confused the client and server causing occasional duplicate packets to be sent and giving the error `rcvd too much data` as discussed in #1431. We return `LIBSSH2_ERROR_EAGAIN` instead to allow existing callers to finish sending their own packets. Fixes #1397 Fixes #1431 Related #720 Credit: klux21, rolag
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently SFTP's init will busy loop waiting for the channel to close, even if the underlying transport returns EAGAIN. While this works for sockets, it might not work out if you have a different transport that needs to do some additional processing on the side.