libxev icon indicating copy to clipboard operation
libxev copied to clipboard

fix: allow UDPSendto to be canceled

Open robbielyman opened this issue 1 year ago • 0 comments

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.

robbielyman avatar Nov 09 '24 16:11 robbielyman