#133 fix race.
Some checks failed
autoapprove / autoapprove (pull_request) Has been cancelled
automerge / automerge (pull_request) Has been cancelled
dependabot-automerge / automerge (pull_request) Has been cancelled
codeql / analyze (go) (pull_request) Has been cancelled
prbuild / test (pull_request) Has been cancelled
prbuild / lint (pull_request) Has been cancelled

This commit is contained in:
Gorbunov Kirill Andreevich 2024-04-19 13:16:23 +03:00
parent 1f4cf11afe
commit ceae272ca8

View File

@ -186,7 +186,9 @@ func (s *subscriber) assigned(_ context.Context, c *kgo.Client, assigned map[str
kopts: s.kopts,
opts: s.opts,
}
s.Lock()
s.consumers[tp{topic, partition}] = pc
s.Unlock()
go pc.consume()
}
}