From 3eb88f060048cac52f28bd6709bf188eb1122e80 Mon Sep 17 00:00:00 2001 From: Louis King Date: Wed, 16 Nov 2022 13:35:14 +0000 Subject: [PATCH] Issue #126 Added bytearray('\x00') to the list of expected "noop" returns from the socket. --- adafruit_minimqtt/adafruit_minimqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_minimqtt/adafruit_minimqtt.py b/adafruit_minimqtt/adafruit_minimqtt.py index d654fd7..6387678 100644 --- a/adafruit_minimqtt/adafruit_minimqtt.py +++ b/adafruit_minimqtt/adafruit_minimqtt.py @@ -896,7 +896,7 @@ def _wait_for_msg(self, timeout=0.1): # Block while we parse the rest of the response self._sock.settimeout(timeout) - if res in [None, b""]: + if res in [None, b"", bytearray(b'\x00')]: # If we get here, it means that there is nothing to be received return None if res[0] == MQTT_PINGRESP: