summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-06 10:04:28 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-06 10:04:28 +0100
commitddc42582ebbe3f25c046655fc46a22c21fd9fcc3 (patch)
tree9e315d3e6567e07af76fad2ddecbd473221f60c9
parent485d4470d3b9c09a14e0853c0a00099c3229cbaf (diff)
downloadcurl-ddc42582ebbe3f25c046655fc46a22c21fd9fcc3.tar.gz
pause: force a connection (re-)check after unpausingbagder/unpause-recheck
There might be data available that was already read off the socket, for example in the TLS layer. Reported-by: Anders Berg Fixes #4966
-rw-r--r--lib/easy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 454621076..13bee5706 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -1034,6 +1034,10 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */
+
+ /* force a recv/send check of this connection, as the data might've been
+ read off the socket already */
+ data->conn->cselect_bits = CURL_CSELECT_IN | CURL_CSELECT_OUT;
if(data->multi)
Curl_update_timer(data->multi);
}