Skip to content

net_http: remove unnecessary receive in connection pool polling#18260

Merged
LibretroAdmin merged 1 commit intolibretro:masterfrom
warmenhoven:warmenhoven/pr/net-pool-poll
Sep 16, 2025
Merged

net_http: remove unnecessary receive in connection pool polling#18260
LibretroAdmin merged 1 commit intolibretro:masterfrom
warmenhoven:warmenhoven/pr/net-pool-poll

Conversation

@warmenhoven
Copy link
Copy Markdown
Collaborator

Previously in the !err case this would potentially end up in an infinite loop, if the socket was marked readable but *socket_receive_all_nonblocking kept reading data (when it's not supposed to be in_use, meaning not in an active http transaction, which is a bug), or kept not reading data despite being readable and not indicating an error.

If we get into this case we can safely assume we don't really understand the state of the socket anymore. It's fine to just close it here, it can just get reopened when someone needs it again.

@LibretroAdmin LibretroAdmin merged commit 3fa2648 into libretro:master Sep 16, 2025
31 checks passed
@warmenhoven warmenhoven deleted the warmenhoven/pr/net-pool-poll branch September 16, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants