Skip to content

Fix GH-25148: Blocking socket fread() reports timed_out on Windows after returning buffered data - #25152

Open
jack-worman wants to merge 1 commit into
php:PHP-8.4from
jack-worman:Fix-GH-25148
Open

jack-worman wants to merge 1 commit into
php:PHP-8.4from
jack-worman:Fix-GH-25148

Conversation

@jack-worman

Copy link
Copy Markdown
Contributor

Fixes #25148.

Since #9676 (bug #51056), a blocking socket read that has data buffered only checks for more without waiting. Windows has no MSG_DONTWAIT, so that check is a zero-timeout poll, and when it found nothing, timeout_event was set and stream_get_meta_data() reported timed_out, even though fread() returned data. This clears timeout_event there, keeping the early return so recv() isn't called.

… after returning buffered data

Since the fix for bug #51056, a blocking read that already has data
buffered only checks for more without waiting. Windows has no
MSG_DONTWAIT, so it checks with a zero-timeout poll, and when that poll
found nothing, timeout_event was set and stream_get_meta_data() reported
timed_out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant