Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Mar 13, 2024
1 parent 6119ca3 commit 6700333
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/pd_service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,9 @@ func (c *pdServiceDiscovery) switchLeader(url string) (change bool, err error) {
c.leader.Store(leaderClient)
// Run callbacks
if c.tsoGlobalAllocLeaderUpdatedCb != nil {
return change, c.tsoGlobalAllocLeaderUpdatedCb(url)
if err := c.tsoGlobalAllocLeaderUpdatedCb(url); err != nil {
return change, err
}
}
for _, cb := range c.leaderSwitchedCbs {
cb()
Expand Down

0 comments on commit 6700333

Please sign in to comment.