mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
MQTT library: check for None return from recv().
* Makes it work with different sockets implementations.
This commit is contained in:
parent
e84a26cb31
commit
80d05fdbc3
@ -167,7 +167,7 @@ class MQTTClient:
|
||||
# messages processed internally.
|
||||
def wait_msg(self):
|
||||
res = self.sock.read(1)
|
||||
if res == b"":
|
||||
if res == b"" or res == None:
|
||||
return None
|
||||
self.sock.setblocking(True)
|
||||
if res == b"\xd0": # PINGRESP
|
||||
|
||||
Loading…
Reference in New Issue
Block a user