fix scheduler quit issue

This commit is contained in:
dapan1121 2022-04-15 17:12:31 +08:00
parent bc178c247d
commit 911c81d230
1 changed files with 5 additions and 2 deletions

View File

@ -2734,11 +2734,14 @@ void schedulerFreeTaskList(SArray *taskList) {
void schedulerDestroy(void) {
if (schMgmt.jobRef) {
SSchJob *pJob = taosIterateRef(schMgmt.jobRef, 0);
int64_t refId = 0;
while (pJob) {
refId = pJob->refId;
taosRemoveRef(schMgmt.jobRef, pJob->refId);
pJob = taosIterateRef(schMgmt.jobRef, pJob);
pJob = taosIterateRef(schMgmt.jobRef, refId);
}
taosCloseRef(schMgmt.jobRef);