Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defer adding padding to probe packets to simplify code, fix stream corruption on EAGAIN of packet containing multiple write-buffers #227

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

jthomas43
Copy link
Contributor

This PR defers adding an explicit padding buffer to the mtu probe packets until just before the buffers are sent to sendmsg(). This simplifies code that iterates the packets by removing special cases for padding packets.

It more importantly fixes a stream corruption bug on EAGAIN of a packet containing multiple complete wbufs. these wbufs that failed to send would be added back to the stream->write_queue in reverse order, which would corrupt the stream.

@mafintosh mafintosh merged commit a9f5af9 into holepunchto:main Dec 3, 2024
3 checks passed
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