Skip to content

Commit 56ff490

Browse files
committed
Raise an EOFException on short reads
1 parent 7794722 commit 56ff490

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

polypheny/rpc.py

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def send_msg(self, serialized):
5757

5858
def recv_msg(self):
5959
bl = self.con.recv(8)
60+
if len(bl) != 8:
61+
raise EOFError
6062
n = int.from_bytes(bl, 'little')
6163
raw = self.con.recv(n)
6264
if len(raw) != n:

0 commit comments

Comments
 (0)