We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 913b1d4 commit 8fbb34aCopy full SHA for 8fbb34a
adafruit_minimqtt/adafruit_minimqtt.py
@@ -705,15 +705,17 @@ def ping(self) -> list[int]:
705
self._connected()
706
self.logger.debug("Sending PINGREQ")
707
self._sock.send(MQTT_PINGREQ)
708
- ping_timeout = self.keep_alive
+ ping_timeout = self._recv_timeout
709
stamp = self.get_monotonic_time()
710
rc, rcs = None, []
711
while rc != MQTT_PINGRESP:
712
rc = self._wait_for_msg()
713
if rc:
714
rcs.append(rc)
715
if self.get_monotonic_time() - stamp > ping_timeout:
716
- raise MMQTTException("PINGRESP not returned from broker.")
+ raise MMQTTException(
717
+ f"PINGRESP not returned from broker within {ping_timeout} seconds."
718
+ )
719
return rcs
720
721
# pylint: disable=too-many-branches, too-many-statements
0 commit comments