Skip to content

Commit

Permalink
fix nil
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Mar 22, 2024
1 parent 07ef009 commit 51edb06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/infoschema/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ func getMicroServiceServerInfo(ctx sessionctx.Context, serviceName string) ([]Se
req.Header.Add("PD-Allow-follower-handle", "true")
resp, err := util.InternalHTTPClient().Do(req)
// PD is not in the microservice mode
if resp.StatusCode == http.StatusServiceUnavailable {
if resp != nil && resp.StatusCode == http.StatusNotFound {
terror.Log(resp.Body.Close())
return servers, nil
}
Expand Down

0 comments on commit 51edb06

Please sign in to comment.