From 084be7684d5cb367d4b8995dbf01f177af6113bf Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 20 Jun 2012 10:51:02 +1200 Subject: [PATCH] Close socket on shutdown. --- netlib/tcp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netlib/tcp.py b/netlib/tcp.py index 08ccba091..92a7e92f8 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -158,6 +158,7 @@ class TCPServer: def shutdown(self): self.__shutdown_request = True self.__is_shut_down.wait() + self.socket.close() self.handle_shutdown() def handle_error(self, request, client_address, fp=sys.stderr):