mirror of https://github.com/eclipse/paho.mqtt.c
Don't process publish command if restore fails #1388
This commit is contained in:
parent
25bca9dd55
commit
597cd06e26
|
|
@ -1295,11 +1295,15 @@ static int MQTTAsync_processCommand(void)
|
|||
command = MQTTAsync_restoreCommand(buffer, buflen, MQTTVersion, command);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(LOG_ERROR, -1, "Error restoring command: rc %d from pget\n", rc);
|
||||
command = NULL;
|
||||
}
|
||||
if (buffer)
|
||||
free(buffer);
|
||||
}
|
||||
MQTTAsync_unpersistCommand(command);
|
||||
if (command)
|
||||
MQTTAsync_unpersistCommand(command);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue