handle ZeroReturnError raised by PyOpenSSL
This commit is contained in:
parent
2bd1e1410d
commit
c4a720aa89
|
@ -165,6 +165,10 @@ class PyOpenSSLWrapper(SSLWrapper):
|
|||
log.debug("Recv: Got OpenSSL.SSL.SysCallError: " + repr(e),
|
||||
exc_info=True)
|
||||
raise SSLWrapper.Error(self.sock or self.sslobj, e)
|
||||
except OpenSSL.SSL.ZeroReturnError, e:
|
||||
# end-of-connection raises ZeroReturnError instead of having the
|
||||
# connection's .recv() method return a zero-sized result.
|
||||
raise SSLWrapper.Error(self.sock or self.sslobj, e, -1)
|
||||
except OpenSSL.SSL.Error, e:
|
||||
if self.is_numtoolarge(e):
|
||||
# warn, but ignore this exception
|
||||
|
|
Loading…
Reference in New Issue