From 28d96d8ebca9f6bdb7f272f1095760953e62d828 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 22 Aug 2023 08:39:40 +0100 Subject: [PATCH] Fix `max_inflight_messages` not being set correctly. Closes #2876. --- ChangeLog.txt | 5 +++-- src/context.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a64e7548..7976dbd3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,9 +1,10 @@ -2.0.16 - 2023-08-22 +2.0.17 - 2023-08-22 =================== Broker: -- Fix `max_queued_message 0` stopping clients from receiving messages. +- Fix `max_queued_messages 0` stopping clients from receiving messages. Closes #2879. +- Fix `max_inflight_messages` not being set correctly. Closes #2876. Apps: - Fix `mosquitto_passwd -U` backup file creation. Closes #2873. diff --git a/src/context.c b/src/context.c index 3ed49765..837be458 100644 --- a/src/context.c +++ b/src/context.c @@ -83,9 +83,9 @@ struct mosquitto *context__init(mosq_sock_t sock) } } context->bridge = NULL; - context->msgs_in.inflight_maximum = 1; + context->msgs_in.inflight_maximum = db.config->max_inflight_messages; + context->msgs_in.inflight_quota = db.config->max_inflight_messages; context->msgs_out.inflight_maximum = db.config->max_inflight_messages; - context->msgs_in.inflight_quota = 1; context->msgs_out.inflight_quota = db.config->max_inflight_messages; context->max_qos = 2; #ifdef WITH_TLS