Skip to content

Commit

Permalink
Fix max_queued_message 0 stopping clients from receiving messages.
Browse files Browse the repository at this point in the history
Closes #2789. Thanks to Daedaluz.
  • Loading branch information
ralight committed Aug 22, 2023
1 parent 166d148 commit bfb373d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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
===================

Expand Down
2 changes: 1 addition & 1 deletion lib/packet_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int packet__queue(struct mosquitto *mosq, struct mosquitto__packet *packet)
pthread_mutex_lock(&mosq->out_packet_mutex);

#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);
if(mosq->is_dropping == false){
mosq->is_dropping = true;
Expand Down

0 comments on commit bfb373d

Please sign in to comment.