Skip to content

Commit

Permalink
fix(hatchery/swarm): adjust swarm timeout (#3403)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault committed Oct 5, 2018
1 parent 8e1f54a commit e7a896d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/hatchery/swarm/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ func (h *HatcherySwarm) Init() error {
for hostName, cfg := range h.Config.DockerEngines {
log.Info("hatchery> swarm> connecting to %s: %s", hostName, cfg.Host)
httpClient := new(http.Client)
httpClient.Timeout = 30 * time.Second
// max time for a docker pull, but for most of docker request, there is a request with
// a lower timeout, using context.WithTimeout
httpClient.Timeout = 10 * time.Minute
var tlsc *tls.Config
if cfg.CertPath != "" {
options := tlsconfig.Options{
Expand Down

0 comments on commit e7a896d

Please sign in to comment.