Do not crash after fully establishing connection
This commit is contained in:
parent
dbe23e90ce
commit
75ccf6d692
|
@ -68,7 +68,7 @@ class Connection(threading.Thread):
|
||||||
if self.status == 'fully_established':
|
if self.status == 'fully_established':
|
||||||
data = self.s.recv(4096)
|
data = self.s.recv(4096)
|
||||||
self.buffer_receive += data
|
self.buffer_receive += data
|
||||||
if data and self.buffer_receive < self.next_message_size:
|
if data and len(self.buffer_receive) < self.next_message_size:
|
||||||
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