summaryrefslogtreecommitdiff
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-24 20:04:58 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-24 20:04:58 +0000
commitfc69af15629389801db4da64ac06b0a0e747e60a (patch)
treed2144b94112f150a0df14985241d73227ea955e2 /Lib/ssl.py
parent4d3e372ff3f611aa76458a48f26ec4701315c128 (diff)
downloadcpython-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.py7
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