Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39206 from ijc/no-retry-ping-on-errconn
Browse files Browse the repository at this point in the history
client: do not fallback to GET if HEAD on _ping fail to connect
Upstream-commit: de6df469f1be294fe2dcf8d102725569bca1f056
Component: engine
  • Loading branch information
cpuguy83 authored May 15, 2019
2 parents 9dfc99a + 9669fe6 commit c05b738
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/engine/client/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
// Server handled the request, so parse the response
return parsePingResponse(cli, serverResp)
}
} else if IsErrConnectionFailed(err) {
return ping, err
}

req, err = cli.buildRequest("GET", path.Join(cli.basePath, "/_ping"), nil, nil)
Expand Down

0 comments on commit c05b738

Please sign in to comment.