From fcc1978743464179a7f6b96bc4f95e263f7da573 Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Tue, 5 Sep 2017 10:58:58 +0300 Subject: [PATCH] Handle the case of having several full messages in input buffer --- ircbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircbot.py b/ircbot.py index 5d38f9b..1965327 100644 --- a/ircbot.py +++ b/ircbot.py @@ -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')