mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
This commit is contained in:
parent
4d3e372ff3
commit
fc69af1562
4 changed files with 102 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue