MCPcopy Create free account
hub / github.com/ElementsProject/lightning / peer_connected_in

Function peer_connected_in

connectd/connectd.c:188–202  ·  view source on GitHub ↗

~ Once they've connected in, stop trying to connect out (if we were). */

Source from the content-addressed store, hash-verified

186
187/*~ Once they've connected in, stop trying to connect out (if we were). */
188static void peer_connected_in(struct daemon *daemon,
189 struct io_conn *conn,
190 const struct node_id *id)
191{
192 struct connecting *connect = find_connecting(daemon, id);
193
194 if (!connect)
195 return;
196
197 /* Don't call destroy_io_conn, since we're done. */
198 io_set_finish(connect->conn, NULL, NULL);
199
200 /* Now free the 'connecting' struct since we succeeded. */
201 tal_free(connect);
202}
203
204/*~ When we free a peer, we remove it from the daemon's hashtable.
205 * We also call this manually if we want to elegantly drain peer's

Callers 1

peer_connectedFunction · 0.85

Calls 2

find_connectingFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected