aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-02-19 15:56:54 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-02-20 08:15:32 +0100
commitafc00e047c773faeaa60a5f86a246cbbeeba5819 (patch)
tree993fa74d0cc07a337210e6215d0b2e267dfa2bce /lib/multi.c
parentb08898fb299ad173167631bd4aa9c95458d76f0e (diff)
singlesocket: fix the 'sincebefore' placement
The variable wasn't properly reset within the loop and thus could remain set for sockets that hadn't been set before and miss notifying the app. This is a follow-up to 4c35574 (shipped in curl 7.64.0) Reported-by: buzo-ffm on github Detected-by: Jan Alexander Steffens Fixes #3585 Closes #3589
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index aaae8b978..521262b2b 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2349,8 +2349,6 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
int num;
unsigned int curraction;
int actions[MAX_SOCKSPEREASYHANDLE];
- unsigned int comboaction;
- bool sincebefore = FALSE;
for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++)
socks[i] = CURL_SOCKET_BAD;
@@ -2369,6 +2367,8 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
i++) {
unsigned int action = CURL_POLL_NONE;
unsigned int prevaction = 0;
+ unsigned int comboaction;
+ bool sincebefore = FALSE;
s = socks[i];