aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-29 11:55:23 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-04-29 18:52:17 +0000
commit600d7a85fbdd9f3c7c6977faa07fee7e2e13ce21 (patch)
tree4603dd9e0038d5cc71b677711908f87996b178b0
parent87d48ad8f6e8008bfd7ffaf56c91cb0c8b362330 (diff)
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 <fcoras@cisco.com> Change-Id: I07145e5e00bbe8eb1df2946059459e9fe05cfeb7
-rw-r--r--src/vnet/session/session.c2
1 files changed, 2 insertions, 0 deletions
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))
{