diff options
Diffstat (limited to 'server/failover.c')
-rw-r--r-- | server/failover.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/server/failover.c b/server/failover.c index 462655ca..773f1e7a 100644 --- a/server/failover.c +++ b/server/failover.c @@ -328,22 +328,19 @@ isc_result_t dhcp_failover_link_signal (omapi_object_t *h, link -> state = dhcp_flink_disconnected; /* Make the transition. */ - if (state -> link_to_peer == link) { - dhcp_failover_state_transition (link -> state_object, - name); + if (state->link_to_peer == link) + dhcp_failover_state_transition(link->state_object, name); - /* Start trying to reconnect. */ + /* Schedule an attempt to reconnect. */ #if defined (DEBUG_FAILOVER_TIMING) - log_info ("add_timeout +5 %s", - "dhcp_failover_reconnect"); + log_info("add_timeout +5 dhcp_failover_reconnect"); #endif - tv . tv_sec = cur_time + 5; - tv . tv_usec = 0; - add_timeout (&tv, dhcp_failover_reconnect, - state, - (tvref_t)dhcp_failover_state_reference, - (tvunref_t)dhcp_failover_state_dereference); - } + tv.tv_sec = cur_time + 5; + tv.tv_usec = cur_tv.tv_usec; + add_timeout(&tv, dhcp_failover_reconnect, state, + (tvref_t)dhcp_failover_state_reference, + (tvunref_t)dhcp_failover_state_dereference); + dhcp_failover_state_dereference (&state, MDL); } return ISC_R_SUCCESS; |