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:
Sebastiaan van Stijn 2019-05-23 22:48:02 +02:00 committed by GitHub
commit 7cc3681ad6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)