Blame SOURCES/9900-centos-fix-ssl-connection-resets.patch
|
Pablo Greco |
64330a |
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
|
|
Pablo Greco |
64330a |
index 0aeabc10f2..72b7a94a21 100644
|
|
Pablo Greco |
64330a |
--- a/Lib/test/test_ssl.py
|
|
Pablo Greco |
64330a |
+++ b/Lib/test/test_ssl.py
|
|
Pablo Greco |
64330a |
@@ -2021,6 +2021,16 @@ if _have_threads:
|
|
Pablo Greco |
64330a |
sys.stdout.write(" server: read %r (%s), sending back %r (%s)...\n"
|
|
Pablo Greco |
64330a |
% (msg, ctype, msg.lower(), ctype))
|
|
Pablo Greco |
64330a |
self.write(msg.lower())
|
|
Pablo Greco |
64330a |
+ except ConnectionResetError:
|
|
Pablo Greco |
64330a |
+ # XXX: OpenSSL 1.1.1 sometimes raises ConnectionResetError
|
|
Pablo Greco |
64330a |
+ # when connection is not shut down gracefully.
|
|
Pablo Greco |
64330a |
+ if self.server.chatty and support.verbose:
|
|
Pablo Greco |
64330a |
+ sys.stdout.write(
|
|
Pablo Greco |
64330a |
+ " Connection reset by peer: {}\n".format(
|
|
Pablo Greco |
64330a |
+ self.addr)
|
|
Pablo Greco |
64330a |
+ )
|
|
Pablo Greco |
64330a |
+ self.close()
|
|
Pablo Greco |
64330a |
+ self.running = False
|
|
Pablo Greco |
64330a |
except OSError:
|
|
Pablo Greco |
64330a |
if self.server.chatty:
|
|
Pablo Greco |
64330a |
handle_error("Test server failure:\n")
|