mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
lightningd: don't restart subds unnecessarily on reconnect.
During tests we can see that the subdaemon can be restarted unnecessarily if we're slow enough; we don't need to do so if it's still running. Reported-by: Matt Morehouse <mattmorehouse@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
dec8ad3b8d
commit
af39424491
@ -1276,7 +1276,8 @@ static void peer_connected_hook_final(struct peer_connected_hook_payload *payloa
|
||||
|
||||
/* connect appropriate subds for all (active) channels! */
|
||||
list_for_each(&peer->channels, channel, list) {
|
||||
if (channel_active(channel)) {
|
||||
/* FIXME: It can race by opening a channel before this! */
|
||||
if (channel_active(channel) && !channel->owner) {
|
||||
log_debug(channel->log, "Peer has reconnected, state %s: connecting subd",
|
||||
channel_state_name(channel));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user