Commit 2ee1587a authored by Hanspeter Portner's avatar Hanspeter Portner

fix reconnect loop.

parent 3516dab8
Pipeline #74916060 passed with stages
in 2 minutes and 47 seconds
......@@ -1365,11 +1365,14 @@ main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
openlog(NULL, LOG_PERROR, LOG_DAEMON);
setlogmask(LOG_UPTO(logp));
int ret;
while( (ret = _loop(&app)) && atomic_load(&reconnect) )
int ret = _loop(&app);
while(atomic_load(&reconnect))
{
syslog(LOG_NOTICE, "[%s] preparing to reconnect", __func__);
sleep(1);
ret = _loop(&app);
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment