If we registered a custom lookup service that returns ipv6 addresses, grpc client request would block forever. After tracking source code, I guess the bug exists in build_endpoint method:
fn build_endpoint(&self, ip_address: &SocketAddr) -> Option<Endpoint> {
let uri = format!(
"{}://{}:{}",
self.scheme,
ip_address.ip(),
ip_address.port()
);
// ...
}
If the type of ip_address is SocketAddr::V6, the correct patten should be {}://[{}]:{} instead of {}://{}:{} which would fail the endpoint building. Then the create_changeset method would always report nothing because build_endpoint returns None:
Bug description
If we registered a custom lookup service that returns ipv6 addresses, grpc client request would block forever. After tracking source code, I guess the bug exists in
build_endpoint
method:If the type of
ip_address
is SocketAddr::V6, the correct patten should be{}://[{}]:{}
instead of{}://{}:{}
which would fail the endpoint building. Then thecreate_changeset
method would always report nothing because build_endpoint returnsNone
:To Reproduce
Implement a custom lookup service that returns ipv6 addresses and register it.
Expected behavior
Custom lookup service returns either ipv4 or ipv6 addresses should work correctly.
Environment
Environment independent