From: Michael Tremer Date: Tue, 4 Feb 2025 15:44:41 +0000 (+0000) Subject: daemon: Remove the control connection from the HTTP client X-Git-Tag: 0.9.30~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322208cfea7b6e983304ba4d9dbae7c7ac63b293;p=pakfire.git daemon: Remove the control connection from the HTTP client This is necessary after the connection was unexpectedly closed. Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/daemon.c b/src/pakfire/daemon.c index f8471d49..e2e65d08 100644 --- a/src/pakfire/daemon.c +++ b/src/pakfire/daemon.c @@ -542,6 +542,13 @@ static int pakfire_daemon_close(struct pakfire_xfer* xfer, int code, void* data) struct pakfire_daemon* daemon = data; int r; + // Remove the connection from the client + r = pakfire_httpclient_dequeue(daemon->client, xfer); + if (r < 0) { + ERROR(daemon->ctx, "Failed to remove the control connection: %s\n", strerror(-r)); + return r; + } + // Drop the control connection if (daemon->control) { pakfire_xfer_unref(daemon->control);