Fix max_queued_message 0 stopping clients from receiving messages.

Closes #2789. Thanks to Daedaluz.
This commit is contained in:
Roger A. Light 2023-08-22 07:40:54 +01:00
parent 166d1489f2
commit bfb373d774
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2.0.16 - 2023-08-22
===================
Broker:
- Fix `max_queued_message 0` stopping clients from receiving messages.
Closes #2879.
2.0.16 - 2023-08-16 2.0.16 - 2023-08-16
=================== ===================

View File

@ -154,7 +154,7 @@ int packet__queue(struct mosquitto *mosq, struct mosquitto__packet *packet)
pthread_mutex_lock(&mosq->out_packet_mutex); pthread_mutex_lock(&mosq->out_packet_mutex);
#ifdef WITH_BROKER #ifdef WITH_BROKER
if(mosq->out_packet_count >= db.config->max_queued_messages){ if(db.config->max_queued_messages > 0 && mosq->out_packet_count >= db.config->max_queued_messages){
mosquitto__free(packet); mosquitto__free(packet);
if(mosq->is_dropping == false){ if(mosq->is_dropping == false){
mosq->is_dropping = true; mosq->is_dropping = true;