aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index d007e8814..760884e9b 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -270,7 +270,10 @@ CURLcode Curl_readrewind(struct connectdata *conn)
static int data_pending(struct connectdata *conn)
{
- return Curl_ssl_data_pending(conn, FIRSTSOCKET);
+ /* in the case of libssh2, we can never be really sure that we have emptied
+ its internal buffers so we MUST always try until we get EAGAIN back */
+ return conn->protocol&(PROT_SCP|PROT_SFTP) ||
+ Curl_ssl_data_pending(conn, FIRSTSOCKET);
}
#ifndef MIN