We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2952077 commit 5c44397Copy full SHA for 5c44397
uvloop/handles/udp.pyx
@@ -10,7 +10,11 @@ cdef class UDPTransport(UVBaseTransport):
10
cdef _init(self, Loop loop, object sock, object r_addr):
11
self._start_init(loop)
12
try:
13
+ # It's important to incref the socket in case it
14
+ # was created outside of uvloop,
15
+ # i.e. `look.create_datagram_endpoint(sock=sock)`.
16
socket_inc_io_ref(sock)
17
+
18
self.sock = sock
19
self.address = r_addr
20
self.poll = UVPoll.new(loop, sock.fileno())
0 commit comments