diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-29 23:41:37 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-29 23:41:37 (GMT) |
commit | d2eca37cc5fb13ec7b1f38938296abf8f7802834 (patch) | |
tree | e2f56990b2854df2e22d382667caacec7c5b7121 /Lib/test/ssl_servers.py | |
parent | 77b7de6d18e9d21ce5b772dba7c4653d38bdc7a3 (diff) | |
download | cpython-d2eca37cc5fb13ec7b1f38938296abf8f7802834.zip cpython-d2eca37cc5fb13ec7b1f38938296abf8f7802834.tar.gz cpython-d2eca37cc5fb13ec7b1f38938296abf8f7802834.tar.bz2 |
Clean up socket closing in test_ssl and test.ssl_servers
Diffstat (limited to 'Lib/test/ssl_servers.py')
-rw-r--r-- | Lib/test/ssl_servers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/ssl_servers.py b/Lib/test/ssl_servers.py index cdf9de1..14d6aeb 100644 --- a/Lib/test/ssl_servers.py +++ b/Lib/test/ssl_servers.py @@ -133,7 +133,10 @@ class HTTPSServerThread(threading.Thread): def run(self): if self.flag: self.flag.set() - self.server.serve_forever(0.05) + try: + self.server.serve_forever(0.05) + finally: + self.server.server_close() def stop(self): self.server.shutdown() |