mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
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>
This commit is contained in:
committed by
Christian Decker
parent
b91556283b
commit
c42fa4404a
@@ -547,7 +547,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
|
|||||||
peer_start_channeld(peer, &cs, gossip_index,
|
peer_start_channeld(peer, &cs, gossip_index,
|
||||||
peer_fd, gossip_fd, NULL,
|
peer_fd, gossip_fd, NULL,
|
||||||
true);
|
true);
|
||||||
return;
|
goto connected;
|
||||||
|
|
||||||
case CLOSINGD_SIGEXCHANGE:
|
case CLOSINGD_SIGEXCHANGE:
|
||||||
case CLOSINGD_COMPLETE:
|
case CLOSINGD_COMPLETE:
|
||||||
@@ -559,7 +559,7 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
|
|||||||
peer_start_closingd(peer, &cs, gossip_index,
|
peer_start_closingd(peer, &cs, gossip_index,
|
||||||
peer_fd, gossip_fd,
|
peer_fd, gossip_fd,
|
||||||
true);
|
true);
|
||||||
return;
|
goto connected;
|
||||||
}
|
}
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -571,6 +571,7 @@ return_to_gossipd:
|
|||||||
subd_send_fd(ld->gossip, peer_fd);
|
subd_send_fd(ld->gossip, peer_fd);
|
||||||
subd_send_fd(ld->gossip, gossip_fd);
|
subd_send_fd(ld->gossip, gossip_fd);
|
||||||
|
|
||||||
|
connected:
|
||||||
/* If we were waiting for connection, we succeeded. */
|
/* If we were waiting for connection, we succeeded. */
|
||||||
connect_succeeded(ld, &id);
|
connect_succeeded(ld, &id);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user