Handle the case of having several full messages in input buffer
This commit is contained in:
parent
0657f423f3
commit
fcc1978743
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ class ServerThread(threading.Thread):
|
||||||
|
|
||||||
# Try to see if we have a full line ending with \r\n in the buffer
|
# Try to see if we have a full line ending with \r\n in the buffer
|
||||||
# If yes, handle it
|
# If yes, handle it
|
||||||
if b'\r\n' in server_input_buffer:
|
while b'\r\n' in server_input_buffer:
|
||||||
# Newline was found, split buffer
|
# Newline was found, split buffer
|
||||||
line, _, server_input_buffer = server_input_buffer.partition(b'\r\n')
|
line, _, server_input_buffer = server_input_buffer.partition(b'\r\n')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue