From 5095849884cbf95f2208cab40a9c4a161e5bf415 Mon Sep 17 00:00:00 2001 From: TheKysek Date: Wed, 17 Aug 2016 18:07:06 +0200 Subject: [PATCH] Process message every time we are able to --- src/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.py b/src/connection.py index ee9018d..44bc642 100644 --- a/src/connection.py +++ b/src/connection.py @@ -69,7 +69,7 @@ class Connection(threading.Thread): data = self.s.recv(4096) self.buffer_receive += data logging.debug('Received {} bytes from {}:{}'.format(len(data), self.host, self.port)) - if data: + if data and self.buffer_receive < self.next_message_size: continue else: data = self.s.recv(self.next_message_size - len(self.buffer_receive))