test_imaplib: reap_server() closes the server when done

Fix a ResourceWarning(unclosed socket). Patch written by Nadeem Vawda.
This commit is contained in:
Victor Stinner 2011-01-05 23:01:38 +00:00
parent 33e649cf6d
commit 73efd621fb

View file

@ -135,6 +135,7 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
def reap_server(self, server, thread):
if verbose: print("waiting for server")
server.shutdown()
server.server_close()
thread.join()
if verbose: print("done")