diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-24 20:04:58 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-24 20:04:58 +0000 |
commit | fc69af15629389801db4da64ac06b0a0e747e60a (patch) | |
tree | d2144b94112f150a0df14985241d73227ea955e2 /Lib/ssl.py | |
parent | 4d3e372ff3f611aa76458a48f26ec4701315c128 (diff) | |
download | cpython-git-fc69af15629389801db4da64ac06b0a0e747e60a.tar.gz |
Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py index 9e88073916..1d29bef72d 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -115,12 +115,7 @@ class SSLSocket(socket): 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 |