From: Michael Tremer Date: Sat, 1 Feb 2025 14:12:35 +0000 (+0000) Subject: httpclient: Keep WebSocket connections open X-Git-Tag: 0.9.30~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23da0282d0766e48887520f3f8a435179a6aa865;p=pakfire.git httpclient: Keep WebSocket connections open Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/httpclient.c b/src/pakfire/httpclient.c index 9f0ba326..11627a31 100644 --- a/src/pakfire/httpclient.c +++ b/src/pakfire/httpclient.c @@ -284,6 +284,10 @@ static int pakfire_httpclient_check(struct pakfire_httpclient* self) { // Move to the next message continue; + // Handle signal that the handle should not be dequeued, yet + case EINPROGRESS: + continue; + // Raise any errors default: return r; diff --git a/src/pakfire/xfer.c b/src/pakfire/xfer.c index b2072a3d..509e8149 100644 --- a/src/pakfire/xfer.c +++ b/src/pakfire/xfer.c @@ -1175,6 +1175,9 @@ static pakfire_xfer_error_code_t pakfire_xfer_done_socket( goto ERROR; } + // If we got to here, we want to keep the handle open and connected + r = -EINPROGRESS; + ERROR: if (loop) sd_event_unref(loop);