Skip to content

Commit 49e3967

Browse files
committed
Fix to ip address function
1 parent 171950f commit 49e3967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/scripts/PlayerControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public void updateLocation(Vector3 changeposition, GameObject thegameobject, bo
256256
public void GetLocalIPv4()
257257
{
258258
string externalIpString = new WebClient().DownloadString("http://icanhazip.com").Replace("\\r\\n", "").Replace("\\n", "").Trim();
259-
var externalIp = IPAddress.Parse(serverIPaddress);
259+
var externalIp = IPAddress.Parse(externalIpString);
260260
serverIPaddress = externalIp.ToString();
261261

262262
port = NetworkManager.singleton.GetComponent<kcp2k.KcpTransport>().Port;

0 commit comments

Comments
 (0)