From 600d7a85fbdd9f3c7c6977faa07fee7e2e13ce21 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 29 Apr 2021 11:55:23 -0700 Subject: session: accept notifies for sessions in created state 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 Change-Id: I07145e5e00bbe8eb1df2946059459e9fe05cfeb7 --- src/vnet/session/session.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 5c45cf25146..7fe35c233c8 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -1133,6 +1133,8 @@ session_stream_accept_notify (transport_connection_t * tc) 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)) { -- cgit 1.2.3-korg