]> git.meshlink.io Git - meshlink/blobdiff - src/graph.c
Make datagram SPTPS key exchange more robust.
[meshlink] / src / graph.c
index 98eb469b447087884c52ec21e052192bee30c082..621dd9be3ae0246e316a7b96760a1d29fb5adb25 100644 (file)
@@ -234,6 +234,10 @@ static void check_reachability(void) {
                        /* TODO: only clear status.validkey if node is unreachable? */
 
                        n->status.validkey = false;
+                       if(n->status.sptps) {
+                               sptps_stop(&n->sptps);
+                               n->status.waitingforkey = false;
+                       }
                        n->last_req_key = 0;
 
                        n->maxmtu = MTU;