}
}
- 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;
}
terminate_connection(mesh, disconnect_from->connection, disconnect_from->connection->status.active);
}
+ // reduce timeout if we don't have enough connections + outgoings
+ if(cur_connects + mesh->outgoings->count < 3) {
+ timeout = 1;
+ }
// done!