[#342] client: Disable service config query

By default, gRPC fetches TXT report while resolving a domain.
0914bba6c5/internal/resolver/dns/dns_resolver.go (L336)

This leads to a hanging dial if DNS is unavailable, even though the host
may be specified in `/etc/hosts` (hello, localhost!).

Use `grpc.WithDisableServiceConfig()` to override the default.
This option seems impossible to override with `WithGRPCDialOpts()`,
but we do not use service config anyway.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-03-05 15:06:29 +03:00 committed by Evgenii Stratonikov
parent 7a37613988
commit 69b0711d12

View file

@ -38,6 +38,7 @@ func (c *cfg) initDefault() {
c.rwTimeout = defaultRWTimeout c.rwTimeout = defaultRWTimeout
c.grpcDialOpts = []grpc.DialOption{ c.grpcDialOpts = []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDisableServiceConfig(),
} }
} }