Skip to content

fix: allow UDPSendto to be canceled#127

Open
robbielyman wants to merge 1 commit intomitchellh:mainfrom
robbielyman:cancel_udpsend
Open

fix: allow UDPSendto to be canceled#127
robbielyman wants to merge 1 commit intomitchellh:mainfrom
robbielyman:cancel_udpsend

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

Comments