Commit 736fd828 authored by Antoine Millet's avatar Antoine Millet
Browse files

Pythonization + comments

parent 1b9e9926
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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: