Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 9e88073..1d29bef 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -115,12 +115,7 @@
                                         cert_reqs, ssl_version, ca_certs,
                                         ciphers)
             if do_handshake_on_connect:
-                timeout = self.gettimeout()
-                try:
-                    self.settimeout(None)
-                    self.do_handshake()
-                finally:
-                    self.settimeout(timeout)
+                self.do_handshake()
         self.keyfile = keyfile
         self.certfile = certfile
         self.cert_reqs = cert_reqs