File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -593,7 +593,7 @@ def ping(self) -> list[int]:
593
593
self ._connected ()
594
594
self .logger .debug ("Sending PINGREQ" )
595
595
self ._sock .send (MQTT_PINGREQ )
596
- ping_timeout = self .keep_alive
596
+ ping_timeout = self ._recv_timeout
597
597
stamp = self .get_monotonic_time ()
598
598
self ._last_msg_sent_timestamp = stamp
599
599
rc , rcs = None , []
@@ -602,7 +602,9 @@ def ping(self) -> list[int]:
602
602
if rc :
603
603
rcs .append (rc )
604
604
if self .get_monotonic_time () - stamp > ping_timeout :
605
- raise MMQTTException ("PINGRESP not returned from broker." )
605
+ raise MMQTTException (
606
+ f"PINGRESP not returned from broker within { ping_timeout } seconds."
607
+ )
606
608
return rcs
607
609
608
610
# pylint: disable=too-many-branches, too-many-statements
You can’t perform that action at this time.
0 commit comments