From 6a7d5226c7992ffb77b38a98f370179609b79295 Mon Sep 17 00:00:00 2001 From: trippyone <137233897+trippyone@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:51:32 -0400 Subject: [PATCH] Refactoring --- Fika.Core/Networking/FikaPingingClient.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Fika.Core/Networking/FikaPingingClient.cs b/Fika.Core/Networking/FikaPingingClient.cs index b16a8b8a..9f421447 100644 --- a/Fika.Core/Networking/FikaPingingClient.cs +++ b/Fika.Core/Networking/FikaPingingClient.cs @@ -36,9 +36,10 @@ public bool Init(string serverId) FikaBackendUtils.IsHostNatPunch = result.NatPunch; - if(FikaBackendUtils.IsHostNatPunch) + NetClient.Start(); + + if (FikaBackendUtils.IsHostNatPunch) { - NetClient.Start(); NetClient.NatPunchModule.Init(this); string natHost = RequestHandler.Host.Replace("http://", "").Split(':')[0]; @@ -73,8 +74,6 @@ public bool Init(string serverId) { localEndPoint = new(IPAddress.Parse(localIp), port); } - - NetClient.Start(); } return true;