From 9e588a7b6cb4fff70f223bab1ba3120acff1f18b Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 23 May 2019 23:20:01 +0200 Subject: [PATCH] Autoconnect to reachable nodes without known public keys We must allow the autoconnect algorithm to try connections to nodes that are online but for which we don't have a public key, otherwise we risk that no connections are formed at all, except to the inviting node. --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 348c9e34..a1cccbdf 100644 --- a/src/net.c +++ b/src/net.c @@ -500,7 +500,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { } } - if(!node_read_public_key(mesh, connect_to)) { + if(!connect_to->status.reachable && !node_read_public_key(mesh, connect_to)) { logger(mesh, MESHLINK_DEBUG, "* skip autoconnect since we don't know this node's public key"); skip = true; } -- 2.39.2