diff options
Diffstat (limited to 'src/core/endpt.c')
| -rw-r--r-- | src/core/endpt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c index 5b56b784..10608575 100644 --- a/src/core/endpt.c +++ b/src/core/endpt.c @@ -320,7 +320,8 @@ nni_ep_tmo_start(nni_ep *ep) // have a statistically perfect distribution with the modulo of // the random number, but this really doesn't matter. - ep->ep_tmo_aio.a_expire = nni_clock() + (nni_random() % backoff); + ep->ep_tmo_aio.a_expire = + nni_clock() + (backoff ? nni_random() % backoff : 0); nni_aio_start(&ep->ep_tmo_aio, nni_ep_tmo_cancel, ep); } |
