This commit is contained in:
cescobaz 2023-02-19 14:36:14 +01:00 committed by GitHub
commit fe3b8ca9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1194,8 +1194,10 @@ class _callback_thread(threading.Thread):
while self.go:
buf += self.sl.s.recv(RECV_SIZ)
offset = 0
if len(buf) == 0:
self.stop()
offset = 0
while self.go and (len(buf) - offset) >= MSG_SIZ:
msgbuf = buf[offset:offset + MSG_SIZ]
offset += MSG_SIZ