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-10 16:48:47 +0100
commit32747aafa059a2c3a5e02e42df1bcedcf8b93285 (patch)
treea9cc5551d8e23f9f9872654c65dc26c9aeef8b71
parent07cf042ececdcdc2b731c7a2040a48f21dde85b6 (diff)
downloadcurl-32747aafa059a2c3a5e02e42df1bcedcf8b93285.tar.gz
pause: avoid updating socket if done was already called
... avoids unnecesary recursive risk when the transfer is already done. Reported-by: Richard Bowker Fixes #4563 Closes #4574
-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;
}