mirror of https://github.com/grpc/grpc-java.git
xds: use 0.0.0.0 in the resource query for LDS (#7624)
This commit is contained in:
parent
a43ae54c59
commit
0781d2ca75
|
|
@ -37,7 +37,6 @@ import io.netty.channel.epoll.Epoll;
|
||||||
import io.netty.channel.epoll.EpollEventLoopGroup;
|
import io.netty.channel.epoll.EpollEventLoopGroup;
|
||||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.Inet4Address;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
|
@ -110,12 +109,6 @@ public final class XdsClientWrapperForServerSds {
|
||||||
}
|
}
|
||||||
Node node = bootstrapInfo.getNode();
|
Node node = bootstrapInfo.getNode();
|
||||||
timeService = SharedResourceHolder.get(timeServiceResource);
|
timeService = SharedResourceHolder.get(timeServiceResource);
|
||||||
String instanceIp;
|
|
||||||
try {
|
|
||||||
instanceIp = Inet4Address.getLocalHost().getHostAddress();
|
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
instanceIp = "0.0.0.0";
|
|
||||||
}
|
|
||||||
XdsClient xdsClientImpl =
|
XdsClient xdsClientImpl =
|
||||||
new ServerXdsClient(
|
new ServerXdsClient(
|
||||||
channel,
|
channel,
|
||||||
|
|
@ -124,7 +117,7 @@ public final class XdsClientWrapperForServerSds {
|
||||||
new ExponentialBackoffPolicy.Provider(),
|
new ExponentialBackoffPolicy.Provider(),
|
||||||
GrpcUtil.STOPWATCH_SUPPLIER,
|
GrpcUtil.STOPWATCH_SUPPLIER,
|
||||||
experimentalNewServerApiEnvVar,
|
experimentalNewServerApiEnvVar,
|
||||||
instanceIp,
|
"0.0.0.0",
|
||||||
bootstrapInfo.getGrpcServerResourceId());
|
bootstrapInfo.getGrpcServerResourceId());
|
||||||
start(xdsClientImpl);
|
start(xdsClientImpl);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue