Ping nodes immediately when receiving SIGALRM.

One reason to send the ALRM signal is to let tinc immediately try to connect to
outgoing nodes, for example when PPP or DHCP configuration of the outgoing
interface finished.  Conversely, when the outgoing interface goes down one can
now send this signal to let tinc quickly detect that links are down too.
This commit is contained in:
Guus Sliepen 2010-01-15 23:19:08 +01:00
parent 2a538ed343
commit 51099658c9

View file

@ -418,8 +418,13 @@ int main_loop(void) {
} }
if(sigalrm) { if(sigalrm) {
avl_node_t *node;
logger(LOG_INFO, "Flushing event queue"); logger(LOG_INFO, "Flushing event queue");
expire_events(); expire_events();
for(node = connection_tree->head; node; node = node->next) {
connection_t *c = node->data;
send_ping(c);
}
sigalrm = false; sigalrm = false;
} }