From 7cd0c956f625118142f64e769163932aa8912f00 Mon Sep 17 00:00:00 2001 From: s809 <43530948+s809@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:27:26 +0500 Subject: [PATCH] Fix IPv6 addresses not being properly handled --- .../distanthorizons/core/network/netty/NettyClient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/network/netty/NettyClient.java b/core/src/main/java/com/seibel/distanthorizons/core/network/netty/NettyClient.java index 7655e8e85..84ec55345 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/network/netty/NettyClient.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/network/netty/NettyClient.java @@ -122,7 +122,10 @@ public class NettyClient extends NettyEventSource implements INettyConnection, A { return; } - this.address = new InetSocketAddress(host, port); + + // Remove IPv6 brackets + host = host.replaceAll("[\\[\\]]", ""); + this.address = new InetSocketAddress(host port); if (this.channel != null) {