Skip to content

Commit f200524

Browse files
author
Pietro Albini
committed
Optimize reading from sockets in the IPC server
For some reasons, the server was reading 4 bytes at the time, instead of everything it can. This commit fixes this.
1 parent c937efb commit f200524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

botogram/runner/ipc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def _read_from_socket(conn, length):
236236
if chunk > READ_MAX_CHUNK:
237237
chunk = READ_MAX_CHUNK
238238

239-
resp = conn.recv(4)
239+
resp = conn.recv(chunk)
240240
if len(resp) == 0:
241241
raise EOFError("Broken socket!")
242242

0 commit comments

Comments
 (0)