Skip to content

Commit 5c408ad

Browse files
committed
Update sdk.go
1 parent 6d660f2 commit 5c408ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sdk/sdk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ func (c *client) Ready() <-chan struct{} {
280280
}
281281

282282
func (c *client) Close() {
283-
c.mu.Lock()
284-
defer c.mu.Unlock()
285283
if notifier, ok := c.cache.(store.Notifier); ok {
286284
notifier.Close()
287285
}
288286
c.Publisher.Close()
289287
c.ctxCancel()
288+
c.mu.Lock()
289+
defer c.mu.Unlock()
290290
c.configCatClient.Close()
291291
c.log.Reportf("shutdown complete")
292292
}

0 commit comments

Comments
 (0)