Skip to content

Commit

Permalink
chore(deregister): tweak order the of deregister
Browse files Browse the repository at this point in the history
  • Loading branch information
whalecold committed Nov 17, 2023
1 parent f572399 commit 7e10d13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/circuit_breaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func WithCircuitBreaker(dest, src string, nacosClient nacos.Client, opts utils.O
return []client.Option{
client.WithCircuitBreaker(cbSuite),
client.WithCloseCallbacks(func() error {
err := cbSuite.Close()
err := nacosClient.DeregisterConfig(param, uniqueID)
if err != nil {
return err
}
// cancel the configuration listener when client is closed.
return nacosClient.DeregisterConfig(param, uniqueID)
return cbSuite.Close()
}),
}
}
Expand Down

0 comments on commit 7e10d13

Please sign in to comment.