mirror of https://github.com/joan2937/pigpio
Merge 01f34faef6
into c33738a320
This commit is contained in:
commit
fe3b8ca9dd
|
@ -1194,8 +1194,10 @@ class _callback_thread(threading.Thread):
|
||||||
while self.go:
|
while self.go:
|
||||||
|
|
||||||
buf += self.sl.s.recv(RECV_SIZ)
|
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:
|
while self.go and (len(buf) - offset) >= MSG_SIZ:
|
||||||
msgbuf = buf[offset:offset + MSG_SIZ]
|
msgbuf = buf[offset:offset + MSG_SIZ]
|
||||||
offset += MSG_SIZ
|
offset += MSG_SIZ
|
||||||
|
|
Loading…
Reference in New Issue