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

Function destroy_peer_conn

connectd/multiplex.c:1201–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201static void destroy_peer_conn(struct io_conn *peer_conn, struct peer *peer)
1202{
1203 assert(peer->to_peer == peer_conn);
1204
1205 /* If subds need cleaning, this will do it */
1206 if (!peer->draining)
1207 drain_peer(peer);
1208
1209 peer->to_peer = NULL;
1210
1211 /* Or if there were no subds, this will free the peer. */
1212 maybe_free_peer(peer);
1213}
1214
1215struct io_plan *multiplex_peer_setup(struct io_conn *peer_conn,
1216 struct peer *peer)

Callers

nothing calls this directly

Calls 2

drain_peerFunction · 0.85
maybe_free_peerFunction · 0.85

Tested by

no test coverage detected