aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 897cb1a5a1e..56f885b2aca 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -753,9 +753,10 @@ stream_session_disconnect_notify (transport_connection_t * tc)
stream_session_t *s;
s = session_get (tc->s_index, tc->thread_index);
- server = application_get (s->app_index);
- server->cb_fns.session_disconnect_callback (s);
s->session_state = SESSION_STATE_CLOSING;
+ server = application_get_if_valid (s->app_index);
+ if (server)
+ server->cb_fns.session_disconnect_callback (s);
}
/**