Skip to content

Commit

Permalink
fix: add nil check
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Sep 9, 2024
1 parent f8b76c6 commit d27ba65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/core/ngt/service/ngt.go
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ func (n *ngt) Start(ctx context.Context) <-chan error {
}
return ctx.Err()
case <-tick.C:
if n.vq.IVQLen() >= n.alen {
if n.vq != nil && !n.IsFlushing() && n.vq.IVQLen() >= n.alen {

Check warning on line 911 in pkg/agent/core/ngt/service/ngt.go

View check run for this annotation

Codecov / codecov/patch

pkg/agent/core/ngt/service/ngt.go#L911

Added line #L911 was not covered by tests
err = n.CreateIndex(ctx, n.poolSize)
}
case <-limit.C:
Expand Down

0 comments on commit d27ba65

Please sign in to comment.