Skip to content

Commit

Permalink
Merge pull request #1315 from jdknives/fix/disable-keepalives
Browse files Browse the repository at this point in the history
Fix/disable keepalives
  • Loading branch information
jdknives authored Jul 21, 2022
2 parents 4ef276a + 7118486 commit d8fe620
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/visor/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ func initHypervisors(ctx context.Context, v *Visor, log *logging.Logger) error {
}

func initUptimeTracker(ctx context.Context, v *Visor, log *logging.Logger) error {
const tickDuration = 1 * time.Minute
const tickDuration = 5 * time.Minute

conf := v.conf.UptimeTracker

Expand Down Expand Up @@ -1166,7 +1166,12 @@ func getHTTPClient(ctx context.Context, v *Visor, service string) (*http.Client,
}
return v.dmsgHTTP, nil
}
return &http.Client{}, nil
return &http.Client{
Transport: &http.Transport{
DisableKeepAlives: true,
IdleConnTimeout: time.Second * 5,
},
}, nil
}

func getPublicIP(v *Visor, service string) (string, error) {
Expand Down

0 comments on commit d8fe620

Please sign in to comment.