Skip to content
Snippets Groups Projects
Commit f8e879b4 authored by Bingyi Sun 【孙秉义】's avatar Bingyi Sun 【孙秉义】 Committed by yefu.chen
Browse files

Fix high cpu usage in singlenode


Signed-off-by: default avatarsunby <bingyi.sun@zilliz.com>
parent 7ceb9e4a
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,8 @@ func (c *client) Subscribe(options ConsumerOptions) (Consumer, error) {
}
func consume(ctx context.Context, consumer *consumer) {
for { //nolint:gosimple
select { //nolint:gosimple
for {
select {
case <-ctx.Done():
log.Debug("client finished")
return
......@@ -126,7 +126,6 @@ func consume(ctx context.Context, consumer *consumer) {
Payload: msg[0].Payload,
}
}
default:
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment