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

Pythonization + comments

parent 1b9e9926
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,6 @@ class RpcConnection(object):
handler.
'''
# Try to received remaining data from the socket:
if buf == '':
try:
buf = self._sock.recv(self._remains)
except socket.error as err:
......@@ -205,9 +204,12 @@ class RpcConnection(object):
return
else:
raise
if not buf:
# Empty data on non-blocking socket means that the connection
# has been closed:
self.shutdown()
self._remains -= len(buf)
self._remains -= len(buf)
if self._proto_receiving is None:
self._inbound_buffer += buf
if self._remains == 0:
......
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