Apply maxInflightMessages to MQTT 3.1.1 as well as MQTT 5.0

This commit is contained in:
Ian Craggs 2020-09-30 22:02:42 +01:00
parent b5689b8f99
commit 0722f28240
1 changed files with 1 additions and 2 deletions

View File

@ -1871,8 +1871,7 @@ static int MQTTAsync_processCommand(void)
{
; /* no more message ids available */
}
else if (cmd->client->c->MQTTVersion >= MQTTVERSION_5 &&
((cmd->command.type == PUBLISH && cmd->command.details.pub.qos > 0) ||
else if (((cmd->command.type == PUBLISH && cmd->command.details.pub.qos > 0) ||
cmd->command.type == SUBSCRIBE || cmd->command.type == UNSUBSCRIBE) &&
(cmd->client->c->outboundMsgs->count >= cmd->client->c->maxInflightMessages))
{