fix datarace
Some checks failed
test / test (pull_request) Failing after 18m15s
lint / lint (pull_request) Failing after 18m27s
coverage / build (pull_request) Failing after 18m33s

This commit is contained in:
Evstigneev Denis
2025-12-10 16:51:51 +03:00
parent f98811b93e
commit 813999e969
2 changed files with 6 additions and 0 deletions

View File

@@ -79,8 +79,10 @@ func (s *Subscriber) Unsubscribe(ctx context.Context) error {
kc[ctp.t] = append(kc[ctp.t], ctp.p)
}
s.killConsumers(ctx, kc)
s.mu.Lock()
close(s.done)
s.closed = true
s.mu.Unlock()
s.c.ResumeFetchTopics(s.topic)
return nil