From 298d84941ed673ea386c886bb9dda9b0ed18cc61 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Fri, 11 Sep 2020 13:34:03 +0100 Subject: [PATCH] Fix send quota being incorrecly reset on reconnect. Closes #1822. Thanks to Sarek. --- ChangeLog.txt | 3 +++ lib/handle_connack.c | 1 + 2 files changed, 4 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index c7dcb03f..839ae0c2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Client library: +- Fix send quota being incorrecly reset on reconnect. Closes #1822. + 1.6.12 - 2020-08-19 =================== diff --git a/lib/handle_connack.c b/lib/handle_connack.c index 81c74668..a4282722 100644 --- a/lib/handle_connack.c +++ b/lib/handle_connack.c @@ -103,6 +103,7 @@ int handle__connack(struct mosquitto *mosq) mosquitto_property_read_int32(properties, MQTT_PROP_MAXIMUM_PACKET_SIZE, &mosq->maximum_packet_size, false); mosq->msgs_out.inflight_quota = mosq->msgs_out.inflight_maximum; + message__reconnect_reset(mosq); connack_callback(mosq, reason_code, connect_flags, properties); mosquitto_property_free_all(&properties);