Process message every time we are able to

This commit is contained in:
TheKysek 2016-08-17 18:07:06 +02:00
parent 30a49e1661
commit 5095849884
1 changed files with 1 additions and 1 deletions

View File

@ -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))