libxev
libxev copied to clipboard
fix: allow UDPSendto to be canceled
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.