From be4e6654f3c651dba5f95e7d05da7889c4cd4a0f Mon Sep 17 00:00:00 2001 From: Ian Craggs Date: Thu, 27 Jul 2023 18:39:53 +0100 Subject: [PATCH] Fix ping timer #122 #219 --- MQTTClient-C/src/MQTTClient.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MQTTClient-C/src/MQTTClient.c b/MQTTClient-C/src/MQTTClient.c index aaba8238..6a9beff7 100755 --- a/MQTTClient-C/src/MQTTClient.c +++ b/MQTTClient-C/src/MQTTClient.c @@ -238,11 +238,8 @@ int keepalive(MQTTClient* c) int32_t len = MQTTSerialize_pingreq(c->buf, c->buf_size); if (len > 0 && (rc = sendPacket(c, len, &timer)) == SUCCESS) { - // send the ping packet - // Expect the PINGRESP within 2 seconds of the PINGREQ - // being sent - TimerCountdownMS(&c->pingresp_timer, 2000 ); c->ping_outstanding = 1; + TimerCountdownMS(&c->pingresp_timer, c->keepAliveInterval); } } }