Skip to content

Commit

Permalink
Fix ping timer eclipse#122 eclipse#219
Browse files Browse the repository at this point in the history
  • Loading branch information
icraggs committed Jul 27, 2023
1 parent fc665e4 commit be4e665
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions MQTTClient-C/src/MQTTClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit be4e665

Please sign in to comment.