Skip to content

Commit 77680ae

Browse files
committed
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
1 parent 0aa0d6f commit 77680ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vnet/session/session_input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ app_worker_flush_events_inline (app_worker_t *app_wrk, u32 thread_index,
194194
break;
195195
case SESSION_CTRL_EVT_DISCONNECTED:
196196
s = session_get (evt->session_index, thread_index);
197-
if (s->session_state <= SESSION_STATE_TRANSPORT_CLOSING)
197+
if (!(s->flags & SESSION_F_APP_CLOSED))
198198
app->cb_fns.session_disconnect_callback (s);
199199
break;
200200
case SESSION_CTRL_EVT_RESET:
201201
s = session_get (evt->session_index, thread_index);
202-
if (s->session_state <= SESSION_STATE_TRANSPORT_CLOSING)
202+
if (!(s->flags & SESSION_F_APP_CLOSED))
203203
app->cb_fns.session_reset_callback (s);
204204
break;
205205
case SESSION_CTRL_EVT_UNLISTEN_REPLY:

0 commit comments

Comments
 (0)