Commits

William Pitcock committed 4267ff9

rpc_client.py: messages should end in \r\n to allow batching

  • Participants
  • Parent commits 250e30a

Comments (0)

Files changed (1)

File rpc_client.py

 
     def _call(self, name, **kwargs):
         sock = socket.create_connection((self._host, self._port))
-        envelope = rpc_message.encode(self._secret, name, **kwargs)
+        envelope = rpc_message.encode(self._secret, name, **kwargs) + '\r\n'
         sock.sendall(envelope)
         response = sock.recv(4096)
-        socket.close()
+        sock.close()
 
         return rpc_message.decode(self._secret, response, self._allow_untrusted)[1]