Skip to content
Browse files

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 thus missed notifying
the app.

Detected-by: Jan Alexander Steffens
Fixes #3585
  • Loading branch information...
bagder committed Feb 19, 2019
1 parent 5e1b5e6 commit b7753be57d7bdb6b909f1a0a4207950e18100d79
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/multi.c
@@ -2349,8 +2349,6 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
int num;
unsigned int curraction;
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];

0 comments on commit b7753be

Please sign in to comment.
You can’t perform that action at this time.