Drop libevent and use our own event handling again.
[tinc] / src / graph.c
index 6428f4d..73db3b2 100644 (file)
@@ -213,8 +213,7 @@ static void check_reachability(void) {
                        n->minmtu = 0;
                        n->mtuprobes = 0;
 
-                       if(timeout_initialized(&n->mtuevent))
-                               event_del(&n->mtuevent);
+                       timeout_del(&n->mtutimeout);
 
                        char *name;
                        char *address;
@@ -246,6 +245,8 @@ static void check_reachability(void) {
 
                        if(!n->status.reachable) {
                                update_node_udp(n, NULL);
+                               memset(&n->status, 0, sizeof n->status);
+                               n->options = 0;
                        } else if(n->connection) {
                                if(n->status.sptps) {
                                        if(n->connection->outgoing)