Move retry delay calculation into wakeup, since it's only used there.

This commit is contained in:
Ian Gulliver
2016-02-22 16:33:00 -08:00
parent d6a629fa7e
commit 21536eee33
6 changed files with 16 additions and 23 deletions

View File

@@ -32,7 +32,7 @@ static struct incoming *incoming_head = NULL;
static void incoming_resolve_wrapper(struct peer *);
static void incoming_retry(struct incoming *incoming) {
uint32_t delay = retry_get_delay_ms(incoming->attempt++);
uint32_t delay = wakeup_get_retry_delay_ms(incoming->attempt++);
fprintf(stderr, "I %s: Will retry in %ds\n", incoming->id, delay / 1000);
incoming->peer.event_handler = incoming_resolve_wrapper;
wakeup_add((struct peer *) incoming, delay);