summaryrefslogtreecommitdiffstats
path: root/src/import/curl-util.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:21:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:21:12 +0000
commitcfa69f143f5b99e69ed20f5baf25f405ad591656 (patch)
treef59780d8a555fa514c449d1cee70aca0dc3d84b5 /src/import/curl-util.c
parentReleasing progress-linux version 252.25-1~deb12u1progress7u1. (diff)
downloadsystemd-cfa69f143f5b99e69ed20f5baf25f405ad591656.tar.xz
systemd-cfa69f143f5b99e69ed20f5baf25f405ad591656.zip
Merging upstream version 252.26.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/import/curl-util.c7
1 files changed, 7 insertions, 0 deletions
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)