File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 35
35
import ssl
36
36
ssl_available = True
37
37
try :
38
+ SSLEOFError = ssl .SSLEOFError
38
39
SSLWantReadError = ssl .SSLWantReadError
39
40
SSLWantWriteError = ssl .SSLWantWriteError
40
41
SSLZeroReturnError = ssl .SSLZeroReturnError
43
44
log .debug ('Old SSL module detected.'
44
45
' SSL error handling may not operate cleanly.'
45
46
' Consider upgrading to Python 3.3 or 2.7.9' )
47
+ SSLEOFError = ssl .SSLError
46
48
SSLWantReadError = ssl .SSLError
47
49
SSLWantWriteError = ssl .SSLError
48
50
SSLZeroReturnError = ssl .SSLError
@@ -429,7 +431,7 @@ def _try_handshake(self):
429
431
# old ssl in python2.6 will swallow all SSLErrors here...
430
432
except (SSLWantReadError , SSLWantWriteError ):
431
433
pass
432
- except (SSLZeroReturnError , ConnectionError ):
434
+ except (SSLZeroReturnError , ConnectionError , SSLEOFError ):
433
435
log .warning ('SSL connection closed by server during handshake.' )
434
436
self .close (Errors .ConnectionError ('SSL connection closed by server during handshake' ))
435
437
# Other SSLErrors will be raised to user
You can’t perform that action at this time.
0 commit comments