Fix kafka consumer double close (#25051)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/25054/head
congqixia 2023-06-25 14:16:44 +08:00 committed by GitHub
parent 00f8f236d7
commit 6a1eff3487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -251,7 +251,6 @@ func (kc *Consumer) CheckTopicValid(topic string) error {
func (kc *Consumer) Close() {
kc.closeOnce.Do(func() {
close(kc.closeCh)
kc.wg.Wait()
kc.c.Close()
kc.wg.Wait() // wait worker exist and close the client
})
}