Skip to content

Commit

Permalink
* FIX [trans/quic] packmax should be applied to both mqttv311 and mqtv5.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <wangwei@emqx.io>
  • Loading branch information
wanghaEMQ authored and JaylinYu committed May 15, 2024
1 parent 0caaf48 commit 4723ee9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/mqtt/transport/tcp/mqtt_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,12 +781,13 @@ mqtt_tcptran_pipe_send_start(mqtt_tcptran_pipe *p)
p->qosmax == 0 ? *header &= 0XF9 : NNI_ARG_UNUSED(*header);
}
}
// check max packet size
if (nni_msg_header_len(msg) + nni_msg_len(msg) > p->packmax) {
txaio = p->txaio;
nni_aio_finish_error(txaio, UNSPECIFIED_ERROR);
return;
}
}

// check max packet size
if (nni_msg_header_len(msg) + nni_msg_len(msg) > p->packmax) {
txaio = p->txaio;
nni_aio_finish_error(txaio, UNSPECIFIED_ERROR);
return;
}

txaio = p->txaio;
Expand Down

0 comments on commit 4723ee9

Please sign in to comment.