Browse Source

connect: succeed if we connect to peer and it *doesn't* go back to gossipd.

The JSON connect command wouldn't terminate if peer reconnected
in a state CHANNELD_AWAITING_LOCKIN or above.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
c42fa4404a
  1. 5
      lightningd/peer_control.c

5
lightningd/peer_control.c

@ -547,7 +547,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
peer_start_channeld(peer, &cs, gossip_index,
peer_fd, gossip_fd, NULL,
true);
return;
goto connected;
case CLOSINGD_SIGEXCHANGE:
case CLOSINGD_COMPLETE:
@ -559,7 +559,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
peer_start_closingd(peer, &cs, gossip_index,
peer_fd, gossip_fd,
true);
return;
goto connected;
}
abort();
}
@ -571,6 +571,7 @@ return_to_gossipd:
subd_send_fd(ld->gossip, peer_fd);
subd_send_fd(ld->gossip, gossip_fd);
connected:
/* If we were waiting for connection, we succeeded. */
connect_succeeded(ld, &id);
return;

Loading…
Cancel
Save