From dea6230c7b2f5066268d3fa05976a733be91e748 Mon Sep 17 00:00:00 2001 From: Lautaro Mazzitelli Date: Thu, 26 Sep 2024 10:17:24 +0200 Subject: [PATCH] fix(launchpad): nat mode only when first time automatic --- node-launchpad/src/components/status.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index d06e777953..7fa81b3412 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -183,7 +183,8 @@ impl Status { /// Only run NAT detection if we haven't determined the status yet and we haven't failed more than 3 times. fn should_we_run_nat_detection(&self) -> bool { - !self.is_nat_status_determined + self.connection_mode == ConnectionMode::Automatic + && !self.is_nat_status_determined && self.error_while_running_nat_detection < MAX_ERRORS_WHILE_RUNNING_NAT_DETECTION }