mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
110a47c4f4
commit
cf9c41c422
|
@ -2382,6 +2382,7 @@ class ThreadedEchoServer(threading.Thread):
|
||||||
if self.server.chatty and support.verbose:
|
if self.server.chatty and support.verbose:
|
||||||
sys.stdout.write(err.args[1])
|
sys.stdout.write(err.args[1])
|
||||||
# test_pha_required_nocert is expecting this exception
|
# test_pha_required_nocert is expecting this exception
|
||||||
|
self.close()
|
||||||
raise ssl.SSLError('tlsv13 alert certificate required')
|
raise ssl.SSLError('tlsv13 alert certificate required')
|
||||||
except OSError:
|
except OSError:
|
||||||
if self.server.chatty:
|
if self.server.chatty:
|
||||||
|
|
Loading…
Reference in New Issue