Issue #8524: When creating an SSL socket, the timeout value of the
original socket wasn't retained (instead, a socket with a positive timeout
would be turned into a non-blocking SSL socket).
diff --git a/Lib/ssl.py b/Lib/ssl.py
index a42643f..f06792e 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -102,6 +102,7 @@
                             type=sock.type,
                             proto=sock.proto,
                             fileno=_dup(sock.fileno()))
+            self.settimeout(sock.gettimeout())
             sock.close()
         elif fileno is not None:
             socket.__init__(self, fileno=fileno)