mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 19:18:53 +08:00
python: shutdown socket at the end of the event loop
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user