-
Notifications
You must be signed in to change notification settings - Fork 32
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-hs can't send 3megabyte file #10
Comments
It's not just 3MiB... a 180KiB file blocks it too... I've been trying to fix this for the past 3 hours, got no results yet. HELP! |
OK, found the bug. I'd submit a pull request but I'm not sure of the correctness of my fix. The problem is as follows: I made transfers work (https://gist.github.com/5428276) but this doesn't feel all right since there are 3 possible states for session direction: [INBOUND], [OUTBOUND], [INBOUND, OUTBOUND] (as seen in int2dir). During file transfers, the observed direction is the latest, and in this case it only needs to threadWaitWrite, but what if there were a case where it needed to threadWaitRead too? This "fix" would undoubtedly break. In any case, take this patch as a proof of concept as to where the bug is. |
Applied that patch to master for now. If anyone has better solutions, you are welcome. |
I am able to send small files but libssh2 blocks when I try to send a 3mb file.
The text was updated successfully, but these errors were encountered: