From: Daniel Stenberg Date: Fri, 8 Nov 2019 22:07:55 +0000 (+0100) Subject: pause: avoid updating socket if done was already called X-Git-Tag: curl-7_68_0~176 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32747aafa059a2c3a5e02e42df1bcedcf8b93285;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/easy.c b/lib/easy.c index 001648d49b..fc5eceb6a2 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; }