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

Function destroy_subd

connectd/multiplex.c:1037–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037static void destroy_subd(struct subd *subd)
1038{
1039 struct peer *peer = subd->peer;
1040 size_t pos;
1041
1042 for (pos = 0; peer->subds[pos] != subd; pos++)
1043 assert(pos < tal_count(peer->subds));
1044
1045 tal_arr_remove(&peer->subds, pos);
1046
1047 /* Make sure we try to keep reading from peer (might
1048 * have been waiting for write_to_subd) */
1049 io_wake(&peer->peer_in);
1050
1051 /* Maybe we were last subd out? */
1052 maybe_free_peer(peer);
1053}
1054
1055static struct subd *new_subd(struct peer *peer,
1056 const struct channel_id *channel_id)

Callers

nothing calls this directly

Calls 2

io_wakeFunction · 0.85
maybe_free_peerFunction · 0.85

Tested by

no test coverage detected