Fix issue where the second send fails on linux when using UDP.#185
Open
hydra wants to merge 1 commit intojamesmunns:mainfrom
Open
Fix issue where the second send fails on linux when using UDP.#185hydra wants to merge 1 commit intojamesmunns:mainfrom
hydra wants to merge 1 commit intojamesmunns:mainfrom
Conversation
* this occurs when using a local address for the destination, it may occur on other scenarios too. Reference: tokio-rs/tokio#4996
Darksonn
reviewed
Jan 19, 2026
Comment on lines
+186
to
+188
| // On Linux, the /SECOND/ `send` will cause a `ConnectionRefused` error when there | ||
| // is nothing listening and the source/destination are on the same host. | ||
| ErrorKind::ConnectionRefused => {}, |
There was a problem hiding this comment.
There's no guarantee it happens on the second send. See the Tokio issue.
Collaborator
Author
There was a problem hiding this comment.
Ok, yes, so perhaps the wording should be:
On Linux, /LATER/ calls to send /MAY/ cause a ConnectionRefused error when there is nothing listening and the source/destination are on the same host.
Thoughts? Improvements?
Collaborator
There was a problem hiding this comment.
This looks good to me. The rewording you proposed looks correct, just needs to be pushed.
Otherwise LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This exampled, from tokio-rs/tokio#4996 demonstrates the root cause:
It was entirely non-obvious why that worked on Windows and on the Linux used by the raspberry Pi was using for testing didn't work on a new linux installation (Bazzite, Fedora 43 20260101
6.17.7-ba22.fc43.x86_64).