]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: fix multi_sock handling of select_bits 12976/head
authorStefan Eissing <stefan@eissing.org>
Thu, 22 Feb 2024 08:01:06 +0000 (09:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 22 Feb 2024 13:15:27 +0000 (14:15 +0100)
- OR the event bitmask to data->state.select_bits instead of overwriting
  them. They are cleared again on use.

Reported-by: 5533asdg on github
Fixes #12971
Closes #12972

lib/multi.c

index 48a92928c8db7d0805927f026666eb758a51f188..6efd164ee29c0bf4cc5e549c569b760456454656 100644 (file)
@@ -3243,7 +3243,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
 
         if(data->conn && !(data->conn->handler->flags & PROTOPT_DIRLOCK))
           /* set socket event bitmask if they're not locked */
-          data->state.select_bits = (unsigned char)ev_bitmask;
+          data->state.select_bits |= (unsigned char)ev_bitmask;
 
         Curl_expire(data, 0, EXPIRE_RUN_NOW);
       }