File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ cdef class UDPTransport(UVBaseTransport):
20
20
self .poll = UVPoll.new(loop, sock.fileno())
21
21
self ._finish_init()
22
22
except :
23
+ self ._free()
23
24
self ._abort_init()
24
25
raise
25
26
@@ -102,6 +103,7 @@ cdef class UDPTransport(UVBaseTransport):
102
103
cdef _dealloc_impl(self ):
103
104
if self ._closed == 0 :
104
105
self ._warn_unclosed()
106
+ self ._close()
105
107
106
108
# It is unsafe to call `self.poll._close()` here as
107
109
# we might be at the stage where all CPython objects
@@ -110,7 +112,7 @@ cdef class UDPTransport(UVBaseTransport):
110
112
111
113
UVHandle._dealloc_impl(self )
112
114
113
- cdef _close (self ):
115
+ cdef _free (self ):
114
116
if self .poll is not None :
115
117
self .poll._close()
116
118
self .poll = None
@@ -122,6 +124,11 @@ cdef class UDPTransport(UVBaseTransport):
122
124
finally :
123
125
self .sock = None
124
126
127
+ UVBaseTransport._free(self )
128
+
129
+ cdef _close(self ):
130
+ self ._free()
131
+
125
132
if UVLOOP_DEBUG:
126
133
self ._loop._debug_handles_closed.update([
127
134
self .__class__.__name__ ])
You can’t perform that action at this time.
0 commit comments