session: flag instead of state for filtering ntf
Avoid situations when notifications are delayed for long enough for
transports to start closing/cleaning up.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id35b0099adb5242108154a5e19d5ee15e6ca0058
diff --git a/src/vnet/session/session_input.c b/src/vnet/session/session_input.c
index e686881..9153f07 100644
--- a/src/vnet/session/session_input.c
+++ b/src/vnet/session/session_input.c
@@ -194,12 +194,12 @@
break;
case SESSION_CTRL_EVT_DISCONNECTED:
s = session_get (evt->session_index, thread_index);
- if (s->session_state <= SESSION_STATE_TRANSPORT_CLOSING)
+ if (!(s->flags & SESSION_F_APP_CLOSED))
app->cb_fns.session_disconnect_callback (s);
break;
case SESSION_CTRL_EVT_RESET:
s = session_get (evt->session_index, thread_index);
- if (s->session_state <= SESSION_STATE_TRANSPORT_CLOSING)
+ if (!(s->flags & SESSION_F_APP_CLOSED))
app->cb_fns.session_reset_callback (s);
break;
case SESSION_CTRL_EVT_UNLISTEN_REPLY: