From 2c21481ee82e92330baf052858a21bcb2b84640a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 22 Dec 2024 16:13:04 -0800 Subject: dialer: configure default redial cool-down times (fixes #1964) The missing default of zero leads to a hard spin and exhaustion of the open files (since reaping can take too long). The workaround is to configure these explicitly. --- src/core/dialer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/dialer.c b/src/core/dialer.c index 78122646..d684fd47 100644 --- a/src/core/dialer.c +++ b/src/core/dialer.c @@ -217,11 +217,14 @@ nni_dialer_init(nni_dialer *d, nni_sock *s, nni_sp_tran *tran) int rv; void *dp; - d->d_closed = false; - d->d_data = NULL; - d->d_ref = 1; - d->d_sock = s; - d->d_tran = tran; + d->d_closed = false; + d->d_data = NULL; + d->d_ref = 1; + d->d_sock = s; + d->d_tran = tran; + d->d_inirtime = NNI_SECOND / 100; // 10ms + d->d_maxrtime = NNI_SECOND; + d->d_currtime = d->d_inirtime; nni_atomic_flag_reset(&d->d_started); // Make a copy of the endpoint operations. This allows us to -- cgit v1.2.3-70-g09d2