mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
test_imaplib: reap_server() closes the server when done
Fix a ResourceWarning(unclosed socket). Patch written by Nadeem Vawda.
This commit is contained in:
parent
33e649cf6d
commit
73efd621fb
1 changed files with 1 additions and 0 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue