Author: benjamin.peterson
Date: Sun Oct 31 18:34:34 2010
New Revision: 86047
Log:
fix leaking sockets
Modified:
python/branches/py3k/Lib/test/test_asyncore.py
Modified: python/branches/py3k/Lib/test/test_asyncore.py
==============================================================================
--- python/branches/py3k/Lib/test/test_asyncore.py (original)
+++ python/branches/py3k/Lib/test/test_asyncore.py Sun Oct 31 18:34:34 2010
@@ -564,6 +564,7 @@
asyncore.dispatcher.handle_accept(self)
def handle_accepted(self, sock, addr):
+ sock.close()
self.flag = True
server = TestListener()
@@ -721,6 +722,7 @@
s = asyncore.dispatcher(socket.socket())
self.assertFalse(s.socket.getsockopt(socket.SOL_SOCKET,
socket.SO_REUSEADDR))
+ s.socket.close()
s.create_socket(socket.AF_INET, socket.SOCK_STREAM)
s.set_reuse_addr()
self.assertTrue(s.socket.getsockopt(socket.SOL_SOCKET,