--- a/RefactoringRope/JsonServer.py Thu Oct 05 19:24:14 2017 +0200 +++ b/RefactoringRope/JsonServer.py Fri Oct 06 18:39:09 2017 +0200 @@ -195,7 +195,9 @@ connection = self.__connection if connection is not None: - connection.write(cmd.encode('utf8', 'backslashreplace')) + data = cmd.encode('utf8', 'backslashreplace') + length = "{0:09d}".format(len(data)) + connection.write(length.encode() + data) if flush: connection.flush()