Skip to content
Snippets Groups Projects
Commit 3e35e5ed authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed bug with ssl error handling.

parent e7697c16
No related branches found
No related tags found
No related merge requests found
......@@ -122,11 +122,12 @@ class RpcConnection(object):
try:
buf = self._sock.recv(RpcConnection.RECV_BUF_SIZE)
except socket.error as err:
if err.errno == 11:
# Errno 11 -> retry again
logging.debug('Non critical error while reading a socket:'
' %r', err)
if isinstance(err, socket.error) and err.errno == 11:
return
elif isinstance(err, ssl.SSLError) and err.errno == 2:
return
else:
raise err
if not buf:
# Empty buffer = closed socket.
......
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