Do not go into infinite loop after closing connection
This commit is contained in:
parent
dc75f93e1f
commit
30a49e1661
|
@ -69,6 +69,7 @@ class Connection(threading.Thread):
|
||||||
data = self.s.recv(4096)
|
data = self.s.recv(4096)
|
||||||
self.buffer_receive += data
|
self.buffer_receive += data
|
||||||
logging.debug('Received {} bytes from {}:{}'.format(len(data), self.host, self.port))
|
logging.debug('Received {} bytes from {}:{}'.format(len(data), self.host, self.port))
|
||||||
|
if data:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
data = self.s.recv(self.next_message_size - len(self.buffer_receive))
|
data = self.s.recv(self.next_message_size - len(self.buffer_receive))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user