Skip to content

Commit

Permalink
Drain asic queue before processing shutdown request (sonic-net#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored and lguohan committed Dec 3, 2018
1 parent 11fc262 commit b4a7160
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3593,6 +3593,15 @@ int syncd_main(int argc, char **argv)
* lead to unable to find some objects.
*/

SWSS_LOG_NOTICE("is asic queue empty: %d",asicState->empty());

while (!asicState->empty())
{
processEvent(*asicState.get());
}

SWSS_LOG_NOTICE("drained queue");

shutdownType = handleRestartQuery(*restartQuery);
if (shutdownType != SYNCD_RESTART_TYPE_PRE_SHUTDOWN)
{
Expand Down

0 comments on commit b4a7160

Please sign in to comment.