File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -245,21 +245,14 @@ cdef class UDPTransport(UVBaseTransport):
245245
246246 exc = convert_error(err)
247247 if isinstance (exc, OSError ):
248- self ._protocol.error_received( exc)
248+ run_in_context1( self .context.copy(), self . _protocol.error_received, exc)
249249 else :
250250 self ._fatal_error(exc, True )
251251 else :
252252 self ._maybe_pause_protocol()
253253
254254 else :
255- if err < 0 :
256- exc = convert_error(err)
257- if isinstance (exc, OSError ):
258- self ._protocol.error_received(exc)
259- else :
260- self ._fatal_error(exc, True )
261- else :
262- self ._on_sent(None , self .context.copy())
255+ self ._on_sent(convert_error(err) if err < 0 else None , self .context.copy())
263256
264257 cdef _on_receive(self , bytes data, object exc, object addr):
265258 if exc is None :
You can’t perform that action at this time.
0 commit comments