Mercurial > cpython-lru_cache-weakref
diff Lib/ssl.py @ 60933:76a052eedee6 legacy-trunk
Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sat, 24 Apr 2010 20:04:58 +0000 |
| parents | d7c783ef4548 |
| children | 7fc211df3d5b |
line wrap: on
line diff
--- a/Lib/ssl.py Sat Apr 24 19:57:01 2010 +0000 +++ b/Lib/ssl.py Sat Apr 24 20:04:58 2010 +0000 @@ -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
