create inet socket with wildcard address

This commit is contained in:
Thorsten Ludewig 2021-12-16 20:09:18 +01:00
parent 6bdfa11b66
commit e8248d1b2b

View file

@ -107,7 +107,9 @@ public class IOUtils {
} catch (NumberFormatException e) {
throw new UserErrorException("Invalid tcp bind address: " + tcpAddress, e);
}
return new InetSocketAddress(host, port);
return "*".equals(host)
? new InetSocketAddress(port)
: new InetSocketAddress(host, port);
}
public static UnixDomainPrincipal getUnixDomainPrincipal(final SocketChannel channel) throws IOException {