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

@@ -34,7 +34,7 @@ static void outgoing_resolve(struct outgoing *);
static void outgoing_resolve_wrapper(struct peer *);
static void outgoing_retry(struct outgoing *outgoing) {
uint32_t delay = retry_get_delay_ms(outgoing->attempt++);
uint32_t delay = wakeup_get_retry_delay_ms(outgoing->attempt++);
fprintf(stderr, "O %s: Will retry in %ds\n", outgoing->id, delay / 1000);
outgoing->peer.event_handler = outgoing_resolve_wrapper;
wakeup_add((struct peer *) outgoing, delay);