From 295207755670c2c887407d1cbbd3ccf2a2cd39f9 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sat, 25 Nov 2017 18:46:46 -0500 Subject: [PATCH] Fix typos --- uvloop/handles/handle.pyx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/uvloop/handles/handle.pyx b/uvloop/handles/handle.pyx index 25f2853..d2a4c51 100644 --- a/uvloop/handles/handle.pyx +++ b/uvloop/handles/handle.pyx @@ -277,15 +277,16 @@ cdef class UVSocketHandle(UVHandle): # Python sockets, i.e. with `loop.create_server(sock=sock)` etc. if self._fileobj is not None: if isinstance(self._fileobj, socket_socket): - # Detaching the socket object is an ideal solution: - # * libuv will actually close the FD + # Detaching the socket object is the ideal solution: + # * libuv will actually close the FD; # * detach() call will reset FD for the Python socket - # object, which means that it won't be closed 2 times. + # object, which means that it won't be closed 2nd time + # when the socket object is GCed. self._fileobj.detach() else: try: # `socket.close()` will raise an EBADF because libuv - # has already closed the underlying FDself. + # has already closed the underlying FD. self._fileobj.close() except OSError as ex: if ex.errno != errno_EBADF: