Skip to content

Commit aee584c

Browse files
yuwatabluca
authored andcommitted
curl-util: do not configure new io event source when the event loop is already dead
Similar to c5ecf09, but for io event source. Fixes #35322. (cherry picked from commit 5b2926d) (cherry picked from commit ce997e9) (cherry picked from commit 5749fc1) (cherry picked from commit e6119ca)
1 parent 91a643a commit aee584c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/import/curl-util.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ static int curl_glue_socket_callback(CURL *curl, curl_socket_t s, int action, vo
6767
return 0;
6868
}
6969

70+
/* Don't configure io event source anymore when the event loop is dead already. */
71+
if (g->event && sd_event_get_state(g->event) == SD_EVENT_FINISHED)
72+
return 0;
73+
7074
r = hashmap_ensure_allocated(&g->ios, &trivial_hash_ops);
7175
if (r < 0) {
7276
log_oom();

0 commit comments

Comments
 (0)