diff options
Diffstat (limited to 'src/vnet/session')
-rw-r--r-- | src/vnet/session/session_input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/session/session_input.c b/src/vnet/session/session_input.c index 41e8beb8abc..5899242f975 100644 --- a/src/vnet/session/session_input.c +++ b/src/vnet/session/session_input.c @@ -225,11 +225,17 @@ app_worker_flush_events_inline (app_worker_t *app_wrk, u32 thread_index, break; case SESSION_CTRL_EVT_TRANSPORT_CLOSED: s = session_get (evt->session_index, thread_index); + /* Notification enqueued before session was refused by app */ + if (PREDICT_FALSE (s->app_wrk_index == APP_INVALID_INDEX)) + break; if (app->cb_fns.session_transport_closed_callback) app->cb_fns.session_transport_closed_callback (s); break; case SESSION_CTRL_EVT_CLEANUP: s = session_get (evt->as_u64[0] & 0xffffffff, thread_index); + /* Notification enqueued before session was refused by app */ + if (PREDICT_FALSE (s->app_wrk_index == APP_INVALID_INDEX)) + break; if (app->cb_fns.session_cleanup_callback) app->cb_fns.session_cleanup_callback (s, evt->as_u64[0] >> 32); if (evt->as_u64[0] >> 32 != SESSION_CLEANUP_SESSION) |