Permalink
Browse files

explicitly close listening and connected sockets

  • Loading branch information...
1 parent dbce62f commit 903b9f0279c102b7efef41558d3186bcae49b1d7 @t-8ch t-8ch committed Feb 2, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 dummyserver/server.py
  2. +1 −0 test/with_dummyserver/test_socketlevel.py
View
1 dummyserver/server.py
@@ -60,6 +60,7 @@ def _start_server(self):
self.ready_lock.release()
self.socket_handler(sock)
+ sock.close()
def run(self):
self.server = self._start_server()
View
1 test/with_dummyserver/test_socketlevel.py
@@ -26,6 +26,7 @@ def multicookie_response_handler(listener):
b'Set-Cookie: foo=1\r\n'
b'Set-Cookie: bar=1\r\n'
b'\r\n')
+ sock.close()
self._start_server(multicookie_response_handler)
pool = HTTPConnectionPool(self.host, self.port)

0 comments on commit 903b9f0

Please sign in to comment.