From 99d7299b243309aab28e6bc2893e57a74468d530 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 9 Jun 2021 13:19:37 +0100 Subject: [PATCH] Fix qos0 messages not being queued when queue_qos0_message enabled. Closes #2224. Thanks to Luigi Caiffa. --- ChangeLog.txt | 2 ++ src/database.c | 2 +- www/posts/2021/06/version-2-0-11-released.md | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4fecec55..15dd0f6a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -15,6 +15,8 @@ Broker: - Fix non-reachable bridge blocking the broker on Windows. Closes #2172. - Fix possible corruption of pollfd array on Windows when bridges were reconnecting. Closes #2173. +- Fix QoS 0 messages not being queued when `queue_qos0_messages` was enabled. + Closes #2224. Clients: - If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect diff --git a/src/database.c b/src/database.c index 4dfceb26..94c9e006 100644 --- a/src/database.c +++ b/src/database.c @@ -110,7 +110,7 @@ bool db__ready_for_queue(struct mosquitto *context, int qos, struct mosquitto_ms return true; } - if(qos == 0){ + if(qos == 0 && db.config->queue_qos0_messages == false){ return false; /* This case is handled in db__ready_for_flight() */ }else{ source_bytes = (ssize_t)msg_data->msg_bytes12; diff --git a/www/posts/2021/06/version-2-0-11-released.md b/www/posts/2021/06/version-2-0-11-released.md index 0768dd47..bd34de71 100644 --- a/www/posts/2021/06/version-2-0-11-released.md +++ b/www/posts/2021/06/version-2-0-11-released.md @@ -27,6 +27,8 @@ release. - Fix non-reachable bridge blocking the broker on Windows. Closes #2172. - Fix possible corruption of pollfd array on Windows when bridges were reconnecting. Closes [#2173]. +- Fix QoS 0 messages not being queued when `queue_qos0_messages` was enabled. + Closes [#2224]. # Clients - If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect @@ -41,3 +43,4 @@ release. [#2173]: https://github.com/eclipse/mosquitto/issues/2173 [#2187]: https://github.com/eclipse/mosquitto/issues/2187 [#2207]: https://github.com/eclipse/mosquitto/issues/2207 +[#2224]: https://github.com/eclipse/mosquitto/issues/2224