mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #39206 from ijc/no-retry-ping-on-errconn
client: do not fallback to GET if HEAD on _ping fail to connect
This commit is contained in:
commit
de6df469f1
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue