Skip to content

Commit

Permalink
fixes per @fantix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Jorgensen committed Aug 26, 2024
1 parent 29bba19 commit dd53a3e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions uvloop/handles/udp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,14 @@ cdef class UDPTransport(UVBaseTransport):

exc = convert_error(err)
if isinstance(exc, OSError):
self._protocol.error_received(exc)
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)
if isinstance(exc, OSError):
self._protocol.error_received(exc)
else:
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

0 comments on commit dd53a3e

Please sign in to comment.