Close socket when an HTTP response is received

This commit is contained in:
2025-11-29 19:56:54 +01:00
parent 954bcb7e3e
commit 64b40dfac7
+1
View File
@@ -634,6 +634,7 @@ void http_client_process_events(HTTP_Client *client,
// Decouple from the socket // Decouple from the socket
socket_set_user(&client->sockets, events[i].handle, NULL); socket_set_user(&client->sockets, events[i].handle, NULL);
socket_close(&client->sockets, events[i].handle);
// Push to the ready queue // Push to the ready queue
assert(client->num_ready < HTTP_CLIENT_CAPACITY); assert(client->num_ready < HTTP_CLIENT_CAPACITY);