Skip to content

Commit 731a8f5

Browse files
wangshengjunlguohan
authored andcommitted
[copporch]: fix the endless loop problem when removing copp table group. (#1038)
Signed-off-by: wangshengjun <[email protected]>
1 parent 1623219 commit 731a8f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

orchagent/copporch.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -628,13 +628,15 @@ void CoppOrch::doTask(Consumer &consumer)
628628
it = consumer.m_toSync.erase(it);
629629
break;
630630
case task_process_status::task_failed:
631+
it = consumer.m_toSync.erase(it);
631632
SWSS_LOG_ERROR("Processing copp task item failed, exiting. ");
632633
return;
633634
case task_process_status::task_need_retry:
634635
SWSS_LOG_ERROR("Processing copp task item failed, will retry.");
635636
it++;
636637
break;
637638
default:
639+
it = consumer.m_toSync.erase(it);
638640
SWSS_LOG_ERROR("Invalid task status:%d", task_status);
639641
return;
640642
}

0 commit comments

Comments
 (0)