From 4279e5cdbd27c381e9f76d50e7cf9ab2d2521ec0 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 14 Jun 2018 23:21:50 +0200 Subject: [PATCH] gossip: Fix "already reaching" issue I think this is what is causing #1536: getting disconnected causes gossipd to attempt to reach the peer again, unconditionally setting the flag to tell the master. At the same time the master also issues a reaching command (which is allowed since it is its first), but then it clashes on the already set flag. Setting this flag only when the master actually needs to be told should fix this. Signed-off-by: Christian Decker --- gossipd/gossip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/gossip.c b/gossipd/gossip.c index 5071d06d3..fbcf92a08 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -3136,7 +3136,7 @@ static void try_reach_peer(struct daemon *daemon, const struct pubkey *id, status_failed(STATUS_FAIL_MASTER_IO, "Already reaching %s", type_to_string(tmpctx, struct pubkey, id)); - reach->master_needs_response = true; + reach->master_needs_response = master_needs_response; return; }