Commit cf9c41c4 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)

Close the TLS connection in test_pha_required_nocert() of test_ssl to
fix a ResourceWarning.
parent 110a47c4
......@@ -2382,6 +2382,7 @@ class ThreadedEchoServer(threading.Thread):
if self.server.chatty and support.verbose:
sys.stdout.write(err.args[1])
# test_pha_required_nocert is expecting this exception
self.close()
raise ssl.SSLError('tlsv13 alert certificate required')
except OSError:
if self.server.chatty:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment