File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,15 +277,16 @@ cdef class UVSocketHandle(UVHandle):
277277 # Python sockets, i.e. with `loop.create_server(sock=sock)` etc.
278278 if self ._fileobj is not None :
279279 if isinstance (self ._fileobj, socket_socket):
280- # Detaching the socket object is an ideal solution:
281- # * libuv will actually close the FD
280+ # Detaching the socket object is the ideal solution:
281+ # * libuv will actually close the FD;
282282 # * detach() call will reset FD for the Python socket
283- # object, which means that it won't be closed 2 times.
283+ # object, which means that it won't be closed 2nd time
284+ # when the socket object is GCed.
284285 self ._fileobj.detach()
285286 else :
286287 try :
287288 # `socket.close()` will raise an EBADF because libuv
288- # has already closed the underlying FDself .
289+ # has already closed the underlying FD .
289290 self ._fileobj.close()
290291 except OSError as ex:
291292 if ex.errno != errno_EBADF:
You can’t perform that action at this time.
0 commit comments