Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions uvloop/handles/udp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,15 @@ cdef class UDPTransport(UVBaseTransport):
ctx.close()

exc = convert_error(err)
self._fatal_error(exc, True)
if isinstance(exc, OSError):
run_in_context1(self.context.copy(), self._protocol.error_received, exc)
else:
self._fatal_error(exc, True)
else:
self._maybe_pause_protocol()

else:
if err < 0:
exc = convert_error(err)
self._fatal_error(exc, True)
else:
self._on_sent(None, self.context.copy())
self._on_sent(convert_error(err) if err < 0 else None, self.context.copy())

cdef _on_receive(self, bytes data, object exc, object addr):
if exc is None:
Expand Down
Loading