]> git.ipfire.org Git - pakfire.git/commitdiff
httpclient: Keep WebSocket connections open
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Feb 2025 14:12:35 +0000 (14:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Feb 2025 14:12:35 +0000 (14:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/httpclient.c
src/pakfire/xfer.c

index 9f0ba326339b7fdd1285e4363ccb2fb543bf88f8..11627a31f5dee37d1bc9c89649367af8462a93c4 100644 (file)
@@ -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;
index b2072a3d3c6cad56e52a0ca9f72a83050dae6c1e..509e81499651722ce0f87032bfcc30212e1396b4 100644 (file)
@@ -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);