Commit 6cc62c5f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

python: shutdown socket at the end of the event loop

parent 5b521e60
...@@ -1578,6 +1578,13 @@ try: ...@@ -1578,6 +1578,13 @@ try:
def loop(self): def loop(self):
self.connect(self.server_address) 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.tls_handshake()
self.sock.setblocking(False) self.sock.setblocking(False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment