Skip to content

Commit 6166db9

Browse files
committed
net_http: remove unnecessary receive in connection pool polling
1 parent 62a09b5 commit 6166db9

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

libretro-common/net/net_http.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -703,23 +703,11 @@ static void net_http_conn_pool_remove_expired(void)
703703
{
704704
if (!entry->in_use && FD_ISSET(entry->fd, &fds))
705705
{
706-
char buf[4096];
707-
bool err = false;
708-
#ifdef HAVE_SSL
709-
if (entry->ssl && entry->ssl_ctx)
710-
ssl_socket_receive_all_nonblocking(entry->ssl_ctx, &err, buf, sizeof(buf));
711-
else
712-
#endif
713-
socket_receive_all_nonblocking(entry->fd, &err, buf, sizeof(buf));
714-
715-
if (!err)
716-
continue;
717-
706+
/* if it's not in use and it's reaadable we assume that means it's closed without checking recv */
718707
if (prev)
719708
prev->next = entry->next;
720709
else
721710
conn_pool = entry->next;
722-
/* if it's not in use and it's reaadable we assume that means it's closed without checking recv */
723711
net_http_conn_pool_free(entry);
724712
entry = prev ? prev->next : conn_pool;
725713
}

0 commit comments

Comments
 (0)