mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Update MQTT library.
This commit is contained in:
parent
eff78c2990
commit
76239ea89f
@ -167,11 +167,9 @@ class MQTTClient:
|
|||||||
# messages processed internally.
|
# messages processed internally.
|
||||||
def wait_msg(self):
|
def wait_msg(self):
|
||||||
res = self.sock.recv(1)
|
res = self.sock.recv(1)
|
||||||
self.sock.setblocking(True)
|
|
||||||
if res is None:
|
|
||||||
return None
|
|
||||||
if res == b"":
|
if res == b"":
|
||||||
raise OSError(-1)
|
return None
|
||||||
|
self.sock.setblocking(True)
|
||||||
if res == b"\xd0": # PINGRESP
|
if res == b"\xd0": # PINGRESP
|
||||||
sz = self.sock.recv(1)[0]
|
sz = self.sock.recv(1)[0]
|
||||||
assert sz == 0
|
assert sz == 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user