Commit f847c1f1 authored by Denis Bilenko's avatar Denis Bilenko

Python Issue #5103: SSL handshake would ignore the socket timeout and block...

Python Issue #5103: SSL handshake would ignore the socket timeout and block indefinitely if the other end didn't respond. Patch by Antoine Pitrou.

from http://svn.python.org/view?view=rev&revision=80452
parent b5be1d52
......@@ -83,12 +83,7 @@ class SSLSocket(socket):
keyfile, certfile,
cert_reqs, ssl_version, ca_certs)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment