daemon/peer: try reconnecting based on bitcoind poll time, not 15 seconds.

We seem to be getting spurious reconnect failures on Travis, this
should fix it (15 seconds may be too long at worst case).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-04-25 15:40:27 +09:30 committed by Christian Decker
parent 6d55a17642
commit 09a7064260
1 changed files with 2 additions and 1 deletions

View File

@ -4453,7 +4453,8 @@ static void reconnect_failed(struct io_conn *conn, struct peer *peer)
} }
log_debug(peer->log, "Setting timer to re-connect"); log_debug(peer->log, "Setting timer to re-connect");
new_reltimer(&peer->dstate->timers, peer, time_from_sec(15), try_reconnect, peer); new_reltimer(&peer->dstate->timers, peer, peer->dstate->config.poll_time,
try_reconnect, peer);
} }
static struct io_plan *init_conn(struct io_conn *conn, struct peer *peer) static struct io_plan *init_conn(struct io_conn *conn, struct peer *peer)