From 53b0fc6594cda4c6871c9875853befa1122ff70f Mon Sep 17 00:00:00 2001 From: ardocrat Date: Sat, 18 May 2024 16:51:10 +0300 Subject: [PATCH] node: make max outbound and preferred outbound equal at launch --- src/node/node.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node/node.rs b/src/node/node.rs index 51d593b..6aa6cf0 100644 --- a/src/node/node.rs +++ b/src/node/node.rs @@ -489,7 +489,10 @@ impl Node { fn start_node_server() -> Result { // Get saved server config. let config = NodeConfig::node_server_config(); - let server_config = config.server.clone(); + let mut server_config = config.server.clone(); + // Fix to avoid too many opened files. + server_config.p2p_config.peer_min_preferred_outbound_count = + server_config.p2p_config.peer_max_outbound_count; // Remove temporary file dir. {