Skip to content

Commit

Permalink
fix(tidb-client): wrong status api property (pingcap#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdgit committed Jul 6, 2021
1 parent 21a1529 commit 4d7a2eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tidb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ func (c *Client) Get(relativeURI string) (*httpc.Response, error) {
var addr string
switch {
case c.enforceStatusAPIAddresss:
addr = c.sqlAPIAddress
addr = c.statusAPIAddress
case overrideEndpoint != "":
addr = overrideEndpoint
default:
addr = c.sqlAPIAddress
addr = c.statusAPIAddress
}
if addr == "" {
if addr, err = c.forwarder.getEndpointAddr(c.forwarder.statusPort); err != nil {
Expand Down

0 comments on commit 4d7a2eb

Please sign in to comment.