From 6166db917d5b44f8593cb188314d450ffe95771e Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Tue, 16 Sep 2025 11:40:19 -0400 Subject: [PATCH] net_http: remove unnecessary receive in connection pool polling --- libretro-common/net/net_http.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c index 6358cca0986c..54ff25e07e1b 100644 --- a/libretro-common/net/net_http.c +++ b/libretro-common/net/net_http.c @@ -703,23 +703,11 @@ static void net_http_conn_pool_remove_expired(void) { if (!entry->in_use && FD_ISSET(entry->fd, &fds)) { - char buf[4096]; - bool err = false; -#ifdef HAVE_SSL - if (entry->ssl && entry->ssl_ctx) - ssl_socket_receive_all_nonblocking(entry->ssl_ctx, &err, buf, sizeof(buf)); - else -#endif - socket_receive_all_nonblocking(entry->fd, &err, buf, sizeof(buf)); - - if (!err) - continue; - + /* if it's not in use and it's reaadable we assume that means it's closed without checking recv */ if (prev) prev->next = entry->next; else conn_pool = entry->next; - /* if it's not in use and it's reaadable we assume that means it's closed without checking recv */ net_http_conn_pool_free(entry); entry = prev ? prev->next : conn_pool; }