Skip to content

fix(receive): a receive 0 should immediately return, not block - #471

Merged
alerque merged 2 commits into
masterfrom
fix/zero-read
Aug 31, 2026
Merged

alerque merged 2 commits into
masterfrom
fix/zero-read

Conversation

@Tieske

@Tieske Tieske commented Aug 30, 2026 •

Copy link
Copy Markdown
Member

The fix is slightly more complex because reading from a closed
socket should still return a closed-error.

Due to merge conflicts, this PR is targeted at PR #463

fixes: #427
fixes: ledgetech/lua-resty-http#313

Edit: added another commit to ensure we also test the same case for UDP. This fixes 2 issues encountered;

  1. a bad call to getnameinfo, now fixed
  2. a none-standard result on Windows, now normalized

Reviewing is best done commit by commit.

The fix is slightly more complex because reading from a closed
socket should still return a closed-error.

fixes: #427
fixes: ledgetech/lua-resty-http#313
@Tieske
Tieske force-pushed the fix/zero-read branch 3 times, most recently from 863ed80 to 2523ca6 Compare August 30, 2026 11:44
@Tieske
Tieske marked this pull request as ready for review August 30, 2026 13:47
Base automatically changed from feat/receive-limit to master August 31, 2026 07:58
@alerque
alerque merged commit b836466 into master Aug 31, 2026
23 checks passed
@alerque
alerque deleted the fix/zero-read branch August 31, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

tcp:receive(0) blocks

2 participants