Skip to content

defer on_ack(UV_ECANCEL) if the packet is already in the send queue#281

Merged
jthomas43 merged 3 commits intoholepunchto:mainfrom
jthomas43:uv-udp-fixes
Apr 2, 2026
Merged

defer on_ack(UV_ECANCEL) if the packet is already in the send queue#281
jthomas43 merged 3 commits intoholepunchto:mainfrom
jthomas43:uv-udp-fixes

Conversation

@jthomas43
Copy link
Copy Markdown
Contributor

  • wait to call on_ack(CANCEL) on stream close if a packet is in the send queue, to prevent the user from freeing the underlying buffer before libuv sends the packet.
  • defer close_stream if a destroy packet has already been scheduled to after the destroy is sent.
  • add more asserts and logging

…o close stream if a destroy packet is already in the uv_udp_send queue. Add asserts to catch unexpected conditions
…d EFAULT, just log and drop the packet for others. also log partial packets, but process them.
@jthomas43 jthomas43 requested a review from mafintosh April 2, 2026 07:50
@jthomas43 jthomas43 merged commit 1302a45 into holepunchto:main Apr 2, 2026
3 checks passed
@jthomas43 jthomas43 deleted the uv-udp-fixes branch April 3, 2026 10:40
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