]> git.ipfire.org Git - pakfire.git/commitdiff
httpclient: Prevent that the event loop terminates too early
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Feb 2025 14:25:43 +0000 (14:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Feb 2025 14:25:43 +0000 (14:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/httpclient.c

index 11627a31f5dee37d1bc9c89649367af8462a93c4..5eb578ce5686d470b06d988612e0e70abab0f2b8 100644 (file)
@@ -223,6 +223,10 @@ static int pakfire_httpclient_launch_one(
        // Mark as running
        e->status = PAKFIRE_XFER_RUNNING;
 
+       // Increment the still running counter. This is a bit hacky, but it prevents
+       // that the event loop will terminate too early.
+       self->still_running++;
+
        return 0;
 }