mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:33:32 +03:00
fix SFTP download hang
Matt Wixson found and fixed a bug in the SCP/SFTP area where the code treated a 0 return code from libssh2 to be the same as EAGAIN while in reality it isn't. The problem caused a hang in SFTP transfers from a MessageWay server.
This commit is contained in:
parent
e78e584035
commit
49f3160d69
3 changed files with 9 additions and 2 deletions
|
|
@ -549,7 +549,7 @@ int Curl_read(struct connectdata *conn, /* connection data */
|
|||
else if(conn->protocol & PROT_SFTP)
|
||||
nread = Curl_sftp_recv(conn, num, buffertofill, bytesfromsocket);
|
||||
#ifdef LIBSSH2CHANNEL_EAGAIN
|
||||
if((nread == LIBSSH2CHANNEL_EAGAIN) || (nread == 0))
|
||||
if(nread == LIBSSH2CHANNEL_EAGAIN)
|
||||
/* EWOULDBLOCK */
|
||||
return -1;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue