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 <trevor.luscombe@gmail.com>
This commit is contained in:
parent
3cbe805e71
commit
366ec5c66e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user