c->status.active = false;
- if(c->node)
+ if(c->node && c->node->connection == c)
c->node->connection = NULL;
if(c->edge) {
/* Check if this was our outgoing connection */
if(c->outgoing) {
- do_outgoing_connection(c);
- }
+ do_outgoing_connection(c);
+ } else {
+ connection_del(c);
+ }
}
/*