From 7a0051878bc44176aae8f9ca8743f234e6df1d72 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 04:21:11 +0200 Subject: Adding upstream version 252.26. Signed-off-by: Daniel Baumann --- src/import/curl-util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/import') diff --git a/src/import/curl-util.c b/src/import/curl-util.c index 94f718d..b631f4b 100644 --- a/src/import/curl-util.c +++ b/src/import/curl-util.c @@ -126,6 +126,13 @@ static int curl_glue_timer_callback(CURLM *curl, long timeout_ms, void *userdata assert(curl); + /* Don't configure timer anymore when the event loop is dead already. */ + if (g->timer) { + sd_event *event_loop = sd_event_source_get_event(g->timer); + if (event_loop && sd_event_get_state(event_loop) == SD_EVENT_FINISHED) + return 0; + } + if (timeout_ms < 0) { if (g->timer) { if (sd_event_source_set_enabled(g->timer, SD_EVENT_OFF) < 0) -- cgit v1.2.3