Handle the case of having several full messages in input buffer

This commit is contained in:
Juhani Haverinen 2017-09-05 10:58:58 +03:00
parent 0657f423f3
commit fcc1978743
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class ServerThread(threading.Thread):
# Try to see if we have a full line ending with \r\n in the buffer
# 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
line, _, server_input_buffer = server_input_buffer.partition(b'\r\n')