session/tcp: postpone cleanup on reset
[vpp.git] / src / vnet / session-apps / http_server.c
index 37441bb..d5e0ed9 100644 (file)
@@ -435,7 +435,7 @@ static void
 http_server_session_disconnect_callback (stream_session_t * s)
 {
   http_server_main_t *bsm = &http_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 = bsm->app_index;
@@ -445,8 +445,11 @@ http_server_session_disconnect_callback (stream_session_t * s)
 static void
 http_server_session_reset_callback (stream_session_t * s)
 {
-  clib_warning ("called.. ");
-  stream_session_cleanup (s);
+  http_server_main_t *htm = &http_server_main;
+  vnet_disconnect_args_t _a = { 0 }, *a = &_a;
+  a->handle = session_handle (s);
+  a->app_index = htm->app_index;
+  vnet_disconnect_session (a);
 }
 
 static int