Fix close indexcoord panic (#14237)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2021-12-27 14:16:38 +08:00 committed by GitHub
parent 0dae260a9c
commit e18dac16f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,6 +299,8 @@ func (sched *TaskScheduler) Start() error {
// Close closes the task scheduler of indexing tasks.
func (sched *TaskScheduler) Close() {
sched.cancel()
if sched.cancel != nil {
sched.cancel()
}
sched.wg.Wait()
}