Skip to content

Commit

Permalink
Add explanatory comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
townba committed Nov 21, 2024
1 parent c5d7cc1 commit 7d7352a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions credentials/alts/internal/handshaker/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func Dial(hsAddress string) (*grpc.ClientConn, error) {
if !ok {
// Create a new connection to the handshaker service. Note that
// this connection stays open until the application is closed.
// Disable the service config to avoid unnecessary TXT record lookups that
// cause timeouts with some versions of systemd-resolved.
var err error
hsConn, err = grpc.Dial(hsAddress, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDisableServiceConfig())
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/resolver/dns/dns_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ func (d *dnsResolver) watcher() {
}

func (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error) {
// Skip this particular host to avoid timeouts with some versions of
// systemd-resolved.
if !EnableSRVLookups || d.host == "metadata.google.internal." {
return nil, nil
}
Expand Down

0 comments on commit 7d7352a

Please sign in to comment.