From 9c9a11d73d65801e16a360abdad870ce89a85846 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 21 Sep 2024 20:55:11 +0200 Subject: [PATCH] [select] Do not kill timer in case of (curl,select) combination --- src/main/select.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/select.c b/src/main/select.c index c4a514b1c..281f6d3f7 100644 --- a/src/main/select.c +++ b/src/main/select.c @@ -108,7 +108,6 @@ typedef struct _SockInfo GlobalInfo g; - #define mycase(code) \ case code: s = __STRING(code) @@ -544,15 +543,13 @@ multi_timer_cb_select(CURLM *multi, long timeout_ms, GlobalInfo *g) //fprintf(stderr, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms); /* - * if timeout_ms is -1, just delete the timer + * if timeout_ms is -1, just let the timer to expire. * * For all other values of timeout_ms, this should set or *update* the timer * to the new value */ - if (timeout_ms == -1) { - kill_timer(&g->tim); - } else { /* includes timeout zero */ + if (timeout_ms != -1) { install_timer(&g->tim, timeout_ms, timer_cb_select, g); }