From 2404aa080e1cc62634b44091f58737d2c618e361 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Mar 2018 12:03:52 +0100 Subject: pause: when changing pause state, update socket state Especially unpausing a transfer might have to move the socket back to the "currently used sockets" hash to get monitored. Otherwise it would never get any more data and get stuck. Easily triggered with pausing using the multi_socket API. Reported-by: Philip Prindeville Bug: https://curl.haxx.se/mail/lib-2018-03/0048.html Fixes #2393 Closes #2391 --- lib/easy.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 64c647be2..fa34c3827 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -1099,6 +1099,10 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action) (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) ) Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */ + /* This transfer may have been moved in or out of the bundle, update + the corresponding socket callback, if used */ + Curl_updatesocket(data); + return result; } -- cgit v1.2.3