We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71f9f9d commit 913d275Copy full SHA for 913d275
1 file changed
adafruit_minimqtt/adafruit_minimqtt.py
@@ -593,7 +593,7 @@ def ping(self) -> list[int]:
593
self._connected()
594
self.logger.debug("Sending PINGREQ")
595
self._sock.send(MQTT_PINGREQ)
596
- ping_timeout = self.keep_alive
+ ping_timeout = self._recv_timeout
597
stamp = self.get_monotonic_time()
598
self._last_msg_sent_timestamp = stamp
599
rc, rcs = None, []
@@ -602,7 +602,9 @@ def ping(self) -> list[int]:
602
if rc:
603
rcs.append(rc)
604
if self.get_monotonic_time() - stamp > ping_timeout:
605
- raise MMQTTException("PINGRESP not returned from broker.")
+ raise MMQTTException(
606
+ f"PINGRESP not returned from broker within {ping_timeout} seconds."
607
+ )
608
return rcs
609
610
# pylint: disable=too-many-branches, too-many-statements
0 commit comments