Skip to content

Commit

Permalink
Force the DNS check to timeout after 70 seconds (#3647)
Browse files Browse the repository at this point in the history
This should fix an issue that Matthew has noticed where DNS checks could
hang indefinetely
  • Loading branch information
billyb2 committed Jun 18, 2024
1 parent 9d47fb7 commit 37221f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/command/deploy/machines_deploymachinesapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,8 @@ func (md *machineDeployment) doSmokeChecks(ctx context.Context, lm machine.Leasa
func (md *machineDeployment) checkDNS(ctx context.Context) error {
ctx, span := tracing.GetTracer().Start(ctx, "check_dns")
defer span.End()
ctx, cancel := context.WithTimeout(ctx, time.Second*70)
defer cancel()

client := flyutil.ClientFromContext(ctx)
ipAddrs, err := client.GetIPAddresses(ctx, md.appConfig.AppName)
Expand Down

0 comments on commit 37221f6

Please sign in to comment.