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

Function free_all_subds

connectd/multiplex.c:163–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163static void free_all_subds(struct peer *peer)
164{
165 for (size_t i = 0; i < tal_count(peer->subds); i++) {
166 /* Once conn exists, subd is a child of the conn. Free conn, free subd. */
167 if (peer->subds[i]->conn) {
168 tal_del_destructor(peer->subds[i], destroy_connected_subd);
169 tal_free(peer->subds[i]->conn);
170 } else {
171 /* We told lightningd that peer spoke, but it hasn't returned yet. */
172 tal_free(peer->subds[i]);
173 }
174 }
175 tal_resize(&peer->subds, 0);
176}
177
178/* Send warning, close connection to peer */
179static void send_warning(struct peer *peer, const char *fmt, ...)

Callers 2

send_warningFunction · 0.85
msg_out_dev_disconnectFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected