summaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps/echo_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-12-04 09:21:36 -0800
committerDave Barach <openvpp@barachs.net>2018-12-05 15:36:46 +0000
commit4af830cd7b4a11bb84840183f7eebd6fb43497a6 (patch)
tree3a47abfae6a651a4be8f5c6a6cb180399c90db62 /src/vnet/session-apps/echo_server.c
parent01fdbcca130a6575712de99e26f46e21da432d40 (diff)
session/tcp: postpone cleanup on reset
Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps/echo_server.c')
-rw-r--r--src/vnet/session-apps/echo_server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index e79e8380fe5..c0fdb131603 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -73,7 +73,7 @@ void
echo_server_session_disconnect_callback (stream_session_t * s)
{
echo_server_main_t *esm = &echo_server_main;
- vnet_disconnect_args_t _a, *a = &_a;
+ vnet_disconnect_args_t _a = { 0 }, *a = &_a;
a->handle = session_handle (s);
a->app_index = esm->app_index;
@@ -83,8 +83,12 @@ echo_server_session_disconnect_callback (stream_session_t * s)
void
echo_server_session_reset_callback (stream_session_t * s)
{
+ echo_server_main_t *esm = &echo_server_main;
+ vnet_disconnect_args_t _a = { 0 }, *a = &_a;
clib_warning ("Reset session %U", format_stream_session, s, 2);
- stream_session_cleanup (s);
+ a->handle = session_handle (s);
+ a->app_index = esm->app_index;
+ vnet_disconnect_session (a);
}
int