Skip to content

Commit

Permalink
notification: Exiting orchagent once syncd is down (sonic-net#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
stcheng authored Sep 23, 2016
1 parent 025c82b commit 6784f7b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion orchagent/notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@ void on_port_state_change(uint32_t count, sai_port_oper_status_notification_t *d
}
}

void on_switch_shutdown_request()
{
SWSS_LOG_ENTER();

/* TODO: Later a better restart story will be told here */
SWSS_LOG_ERROR("Syncd stopped");

exit(EXIT_FAILURE);
}

sai_switch_notification_t switch_notifications
{
NULL,
NULL,
on_port_state_change,
NULL,
NULL,
on_switch_shutdown_request,
NULL
};

0 comments on commit 6784f7b

Please sign in to comment.