From 366ec5c66e7c5543f25023cdad5de0d5bcbad1e1 Mon Sep 17 00:00:00 2001 From: Lusco Date: Thu, 16 Dec 2021 14:14:24 +1000 Subject: [PATCH] Update conf.c The default bridge configuration uses the backoff restart configuration, however this is not cleared if only a constant timeout is desired, causing it to always use the backoff configuration with a 30 second cap. To trigger this error, use a bridge configuration with a constant timeout (e.g restart_timeout 5). Note that the timeout value is not honoured. Clear the backoff configuration when applying restart_timeout. Signed-off-by: Trevor Luscombe --- src/conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf.c b/src/conf.c index 22b85097..a3fbc7c4 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1897,6 +1897,8 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload, return MOSQ_ERR_INVAL; } cur_bridge->restart_timeout = atoi(token); + cur_bridge->backoff_base = 0; + cur_bridge->backoff_cap = 0; if(cur_bridge->restart_timeout < 1){ log__printf(NULL, MOSQ_LOG_NOTICE, "restart_timeout interval too low, using 1 second."); cur_bridge->restart_timeout = 1;