code optimization

This commit is contained in:
Cary Xu 2022-04-16 10:53:23 +08:00
parent d268fbf68d
commit d4f7c43bbf
1 changed files with 4 additions and 2 deletions

View File

@ -2735,10 +2735,12 @@ void schedulerDestroy(void) {
if (schMgmt.jobRef) {
SSchJob *pJob = taosIterateRef(schMgmt.jobRef, 0);
int64_t refId = 0;
while (pJob) {
refId = pJob->refId;
if (refId == 0) {
break;
}
taosRemoveRef(schMgmt.jobRef, pJob->refId);
pJob = taosIterateRef(schMgmt.jobRef, refId);