Skip to content
Snippets Groups Projects
Commit c4a720aa authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

handle ZeroReturnError raised by PyOpenSSL

parent 2bd1e141
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment