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

fix: allow UDPSendto to be canceled #127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robbielyman
Copy link
Contributor

if r.recvfrom is error.Canceled, the call to std.net.Address.initPosix fails, because it is passed garbage data.

this PR creates a bogus address in the case that r.recvfrom is any error, in order to correctly pass error handling to user code.

it wasn't immediately clear to me whether std.net.Address.initPosix should succeed in other error cases; a more conservative change would only create the bogus address in the case that r.recvfrom is error.Canceled.

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.

1 participant