void terminate_connection(meshlink_handle_t *mesh, connection_t *c, bool report) {
logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name);
void terminate_connection(meshlink_handle_t *mesh, connection_t *c, bool report) {
logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name);
if(c->edge) {
if(report) {
send_del_edge(mesh, mesh->everyone, c->edge, 0);
if(c->edge) {
if(report) {
send_del_edge(mesh, mesh->everyone, c->edge, 0);