From 90035b7c227e13ac357491e561182ede52cb271b Mon Sep 17 00:00:00 2001 From: waltem01 Date: Thu, 22 Sep 2022 12:11:44 +0200 Subject: [PATCH] ip address fix --- SocketLib.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SocketLib.cs b/SocketLib.cs index e5af36c..9805791 100644 --- a/SocketLib.cs +++ b/SocketLib.cs @@ -24,7 +24,9 @@ public static class Connection { port = (int)_port; // Get computers' ipv4 address - if (ipAddress == null) { + if (_ipAddress != null) + ipAddress = _ipAddress; + else { try { string hostName = Dns.GetHostName(); IPHostEntry entryList = Dns.GetHostEntry(hostName);