Commit 3e35e5ed authored by Antoine Millet's avatar Antoine Millet

Fixed bug with ssl error handling.

parent e7697c16
......@@ -122,11 +122,12 @@ class RpcConnection(object):
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:
elif isinstance(err, ssl.SSLError) and err.errno == 2:
raise err
if not buf:
# Empty buffer = closed socket.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment