From faa1066937a5356e1b642c12d9ca8b904387cabf Mon Sep 17 00:00:00 2001 From: Thiago Silva Date: Mon, 19 Sep 2022 19:19:11 -0300 Subject: [PATCH] If !process it won't hold true anymore --- nano/node/transport/tcp.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nano/node/transport/tcp.cpp b/nano/node/transport/tcp.cpp index 0c545341..80d91227 100644 --- a/nano/node/transport/tcp.cpp +++ b/nano/node/transport/tcp.cpp @@ -672,15 +672,16 @@ void nano::transport::tcp_channels::start_tcp_receive_node_id (std::shared_ptrset_network_version (header.version_using); auto node_id (message.response->first); bool process (!node_l->network.syn_cookies.validate (endpoint_a, node_id, message.response->second) && node_id != node_l->node_id.pub); - if (process) + if (!process) { - /* If node ID is known, don't establish new connection + return; + } + /* If node ID is known, don't establish new connection Exception: temporary channels from bootstrap_server */ - auto existing_channel (node_l->network.tcp_channels.find_node_id (node_id)); - if (existing_channel) - { - process = existing_channel->temporary; - } + auto existing_channel (node_l->network.tcp_channels.find_node_id (node_id)); + if (existing_channel) + { + process = existing_channel->temporary; } if (process) {