summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-11-08 23:07:55 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-11-08 23:07:55 +0100
commit6feda5b1c60c0213d7ae995e46e58e66a2ac1dc8 (patch)
tree9107ca47ca920d858845f508a509e64463f5e707
parent1f73138ce1272ea52c9b0119f5ef67aed28af836 (diff)
downloadcurl-bagder/fixes-4563.tar.gz
pause: avoid updating socket if done was already calledbagder/fixes-4563
... avoids unnecesary recursive risk when the transfer is already done. Reported-by: Richard Bowker Fixes #4563
-rw-r--r--lib/easy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 001648d49..fc5eceb6a 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -1027,9 +1027,10 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
Curl_update_timer(data->multi);
}
- /* This transfer may have been moved in or out of the bundle, update
- the corresponding socket callback, if used */
- Curl_updatesocket(data);
+ if(!data->state.done)
+ /* This transfer may have been moved in or out of the bundle, update the
+ corresponding socket callback, if used */
+ Curl_updatesocket(data);
return result;
}