Slightly randomize all timeouts.

This commit is contained in:
Guus Sliepen 2012-10-21 17:45:16 +02:00
parent 717ea66d7b
commit edc08b73a9
6 changed files with 11 additions and 11 deletions

View file

@ -282,7 +282,7 @@ void retry_outgoing(outgoing_t *outgoing) {
outgoing->timeout = maxtimeout;
timeout_set(&outgoing->ev, retry_outgoing_handler, outgoing);
event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, 0});
event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, rand() % 100000});
logger(DEBUG_CONNECTIONS, LOG_NOTICE,
"Trying to re-establish outgoing connection in %d seconds",