Merge pull request #2408 from tjlusco/constant-restart-timeout-fix

Fix constant restart_timeout
This commit is contained in:
Roger Light 2022-02-24 15:55:36 +00:00 committed by GitHub
commit fad0b39eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;