Skip to content

Commit cf9c41c

Browse files
authored
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.
1 parent 110a47c commit cf9c41c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_ssl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,6 +2382,7 @@ def run(self):
23822382
if self.server.chatty and support.verbose:
23832383
sys.stdout.write(err.args[1])
23842384
# test_pha_required_nocert is expecting this exception
2385+
self.close()
23852386
raise ssl.SSLError('tlsv13 alert certificate required')
23862387
except OSError:
23872388
if self.server.chatty:

0 commit comments

Comments
 (0)