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.
2 parents ea72b34 + 78ef392 commit ece2c14Copy full SHA for ece2c14
src/CayenneMQTTClient/MQTTClient.c
@@ -228,6 +228,11 @@ int keepalive(MQTTClient* c)
228
TimerCountdown(&c->ping_response_timer, c->keepAliveInterval);
229
c->ping_outstanding = 1;
230
}
231
+ else if (rc == MQTT_FAILURE && TimerIsExpired(&c->last_received_timer))
232
+ {
233
+ //If the ping packet failed and the last received timer has expired assume we are disconnected
234
+ c->isconnected = 0;
235
+ }
236
237
else if (TimerIsExpired(&c->ping_response_timer))
238
{
0 commit comments