Makes sure we don't notify apps of sessions that are closing or multiple
times for the same session.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I07145e5e00bbe8eb1df2946059459e9fe05cfeb7
app_wrk = app_worker_get_if_valid (s->app_wrk_index);
if (!app_wrk)
return -1;
app_wrk = app_worker_get_if_valid (s->app_wrk_index);
if (!app_wrk)
return -1;
+ if (s->session_state != SESSION_STATE_CREATED)
+ return 0;
s->session_state = SESSION_STATE_ACCEPTING;
if (app_worker_accept_notify (app_wrk, s))
{
s->session_state = SESSION_STATE_ACCEPTING;
if (app_worker_accept_notify (app_wrk, s))
{