1
0
mirror of https://github.com/eclipse/paho.mqtt.c.git synced 2025-05-06 18:25:48 +08:00

Reset ping_due on close session #1027

This commit is contained in:
Ian Craggs 2021-05-06 13:38:47 +01:00
parent ef9b4c7cc6
commit ccb72a27f0
2 changed files with 2 additions and 0 deletions

View File

@ -2329,6 +2329,7 @@ static void MQTTAsync_closeOnly(Clients* client, enum MQTTReasonCodes reasonCode
FUNC_ENTRY;
client->good = 0;
client->ping_outstanding = 0;
client->ping_due = 0;
if (client->net.socket > 0)
{
MQTTProtocol_checkPendingWrites();

View File

@ -1064,6 +1064,7 @@ static void MQTTClient_closeSession(Clients* client, enum MQTTReasonCodes reason
FUNC_ENTRY;
client->good = 0;
client->ping_outstanding = 0;
client->ping_due = 0;
if (client->net.socket > 0)
{
if (client->connected)