- fsm->min_backoff = 1000;
- fsm->max_backoff = 8000;
- fsm->probe_interval = 5000;
+ fsm->min_backoff = RECONNECT_DEFAULT_MIN_BACKOFF;
+ fsm->max_backoff = RECONNECT_DEFAULT_MAX_BACKOFF;
+ fsm->probe_interval = RECONNECT_DEFAULT_PROBE_INTERVAL;
void
reconnect_set_backoff(struct reconnect *fsm, int min_backoff, int max_backoff)
{
fsm->min_backoff = MAX(min_backoff, 1000);
void
reconnect_set_backoff(struct reconnect *fsm, int min_backoff, int max_backoff)
{
fsm->min_backoff = MAX(min_backoff, 1000);
- fsm->max_backoff = max_backoff ? MAX(max_backoff, 1000) : 8000;
+ fsm->max_backoff = (max_backoff
+ ? MAX(max_backoff, 1000)
+ : RECONNECT_DEFAULT_MAX_BACKOFF);
/* Tell 'fsm' that a connection or listening attempt is in progress.
*
* The FSM will start a timer, after which the connection or listening attempt
/* Tell 'fsm' that a connection or listening attempt is in progress.
*
* The FSM will start a timer, after which the connection or listening attempt