Skip to content

Commit e3cbfa1

Browse files
committed
loop._getaddrinfo: Check if the Future is cancelled before setting error
1 parent 32adc50 commit e3cbfa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

uvloop/loop.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ cdef class Loop:
598598
if not fut.cancelled():
599599
fut.set_result(data)
600600
else:
601-
fut.set_exception(result)
601+
if not fut.cancelled():
602+
fut.set_exception(result)
602603

603604
AddrInfoRequest(self, host, port, family, type, proto, flags, callback)
604605
return fut

0 commit comments

Comments
 (0)