Correct usage of no host name

This commit is contained in:
nathan 2020-09-19 22:06:30 +02:00
parent dc30c18e97
commit 2429810fd7

View File

@ -165,9 +165,10 @@ public final class UdpChannel
{
hasExplicitEndpoint = false;
if (explicitControlAddress == null || explicitControlAddress.getAddress() instanceof Inet4Address) {
endpointAddress = new InetSocketAddress(InetAddress.getByAddress("", new byte[]{0,0,0,0}), 0);
endpointAddress = new InetSocketAddress(InetAddress.getByAddress(null, new byte[]{0,0,0,0}), 0);
} else {
endpointAddress = new InetSocketAddress(InetAddress.getByAddress("", new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}), 0);
endpointAddress = new InetSocketAddress(InetAddress.getByAddress(null, new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
0);
}
}