From f274fc5c685ac245d1d2818046bbfb4b97685211 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 22 Feb 2024 09:01:06 +0100 Subject: [PATCH] multi: fix multi_sock handling of select_bits - 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/multi.c b/lib/multi.c index 48a92928c8..6efd164ee2 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -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); }