diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-19 15:56:54 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-19 15:58:46 +0100 |
commit | b7753be57d7bdb6b909f1a0a4207950e18100d79 (patch) | |
tree | b9fb81a28ebab136c5df4c6270704b11af3f7a57 | |
parent | 5e1b5e6936ea4fea895abbf94b261831d7ba8eff (diff) | |
download | curl-b7753be57d7bdb6b909f1a0a4207950e18100d79.tar.gz |
singlesocket: fix the 'sincebefore' placementbagder/singlesocket-sincebefore
The variable wasn't properly reset within the loop and thus could remain
set for sockets that hadn't been set before and thus missed notifying
the app.
Detected-by: Jan Alexander Steffens
Fixes #3585
-rw-r--r-- | lib/multi.c | 4 |
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]; |