Merge pull request #206 from thaJeztah/19.03_backport_no_retry_ping_on_errconn
[19.03 backport] client: do not fallback to GET if HEAD on _ping fail to connect
This commit is contained in:
commit
7cc3681ad6
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…
Reference in a new issue