jcs
/subtext
/amendments
/489
binkp: Always set next poll to interval seconds even on failure
jcs made amendment 489 about 1 year ago
--- binkp.c Wed Apr 19 00:43:17 2023
+++ binkp.c Mon Apr 24 09:42:55 2023
@@ -117,10 +117,8 @@ binkp_poll(void)
unsigned long started = Time, elapsed;
binkp_connect();
- if (!binkpc) {
- binkp_next_poll = Time + (60 * 5);
+ if (!binkpc)
goto done;
- }
if (!binkp_login())
goto done;
@@ -140,12 +138,12 @@ binkp_poll(void)
elapsed = Time - started;
logger_printf("[binkp] Finished polling in %ld sec%s", elapsed,
elapsed == 1 ? "" : "s");
-
- binkp_next_poll = Time + db->config.binkp_interval_seconds;
done:
if (binkpc != NULL)
binkp_free();
+
+ binkp_next_poll = Time + db->config.binkp_interval_seconds;
binkp_toss_inbox();
}
@@ -187,8 +185,7 @@ binkp_connect(void)
}
hostname = db->config.binkp_hostname;
- error = DNSResolveName(&hostname, &host_ip,
- uthread_yield);
+ error = DNSResolveName(hostname, &host_ip, uthread_yield);
if (error) {
logger_printf("[binkp] Failed resolving binkp host %s: %d",
db->config.binkp_hostname, error);