Skip to content

Commit 93b7b3e

Browse files
committed
fixed up ping_timeout
1 parent ee32e5e commit 93b7b3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,8 @@ def ping(self) -> list[int]:
574574
rc = self._wait_for_msg()
575575
if rc:
576576
rcs.append(rc)
577-
if ticks_diff(ticks_ms(), stamp) > ping_timeout * 1000:
578-
raise MMQTTException("PINGRESP not returned from broker.")
577+
if ticks_diff(ticks_ms(), stamp) / 1000 > ping_timeout:
578+
raise MMQTTException(f"PINGRESP not returned from broker within {ping_timeout} seconds.")
579579
return rcs
580580

581581
# pylint: disable=too-many-branches, too-many-statements

0 commit comments

Comments
 (0)