Skip to content

Commit

Permalink
Move stop notifications thread after remove switch (sonic-net#401)
Browse files Browse the repository at this point in the history
* Move stop notifications trhead after remove switch

* Remove stop notifications processing thread from pre shutdown
  • Loading branch information
kcudnik authored and yxieca committed Dec 18, 2018
1 parent bb3ff64 commit ebd8dfc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3681,7 +3681,6 @@ int syncd_main(int argc, char **argv)
SWSS_LOG_TIMER("warm pre-shutdown");

FlexCounter::removeAllCounters();
stopNotificationsProcessingThread();

sai_attribute_t attr;

Expand Down Expand Up @@ -3814,14 +3813,14 @@ int syncd_main(int argc, char **argv)

FlexCounter::removeAllCounters();

// Stop notification thread before removing switch
stopNotificationsProcessingThread();

{
SWSS_LOG_TIMER("remove switch");
status = sai_switch_api->remove_switch(gSwitchId);
}

// Stop notification thread after removing switch
stopNotificationsProcessingThread();

if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_NOTICE("Can't delete a switch. gSwitchId=0x%lx status=%s", gSwitchId,
Expand Down

0 comments on commit ebd8dfc

Please sign in to comment.