python: shutdown socket at the end of the event loop
This commit is contained in:
parent
5b521e608b
commit
6cc62c5f22
|
@ -1578,6 +1578,13 @@ try:
|
|||
|
||||
def loop(self):
|
||||
self.connect(self.server_address)
|
||||
try:
|
||||
self._loop()
|
||||
finally:
|
||||
self.sock.shutdown(socket.SHUT_RDWR)
|
||||
self.sock.close()
|
||||
|
||||
def _loop(self):
|
||||
self.tls_handshake()
|
||||
self.sock.setblocking(False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue