From 322208cfea7b6e983304ba4d9dbae7c7ac63b293 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 4 Feb 2025 15:44:41 +0000 Subject: [PATCH] daemon: Remove the control connection from the HTTP client This is necessary after the connection was unexpectedly closed. Signed-off-by: Michael Tremer --- src/pakfire/daemon.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.39.5