diff options
Diffstat (limited to 'src/vnet/session-apps/echo_client.c')
-rw-r--r-- | src/vnet/session-apps/echo_client.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c index 51a85c068f8..d100aae5c2a 100644 --- a/src/vnet/session-apps/echo_client.c +++ b/src/vnet/session-apps/echo_client.c @@ -424,9 +424,15 @@ echo_clients_session_connected_callback (u32 app_index, u32 api_context, static void echo_clients_session_reset_callback (stream_session_t * s) { + echo_client_main_t *ecm = &echo_client_main; + vnet_disconnect_args_t _a = { 0 }, *a = &_a; + if (s->session_state == SESSION_STATE_READY) clib_warning ("Reset active connection %U", format_stream_session, s, 2); - stream_session_cleanup (s); + + a->handle = session_handle (s); + a->app_index = ecm->app_index; + vnet_disconnect_session (a); return; } @@ -440,7 +446,7 @@ static void echo_clients_session_disconnect_callback (stream_session_t * s) { echo_client_main_t *ecm = &echo_client_main; - vnet_disconnect_args_t _a, *a = &_a; + vnet_disconnect_args_t _a = { 0 }, *a = &_a; a->handle = session_handle (s); a->app_index = ecm->app_index; vnet_disconnect_session (a); @@ -451,7 +457,7 @@ void echo_clients_session_disconnect (stream_session_t * s) { echo_client_main_t *ecm = &echo_client_main; - vnet_disconnect_args_t _a, *a = &_a; + vnet_disconnect_args_t _a = { 0 }, *a = &_a; a->handle = session_handle (s); a->app_index = ecm->app_index; vnet_disconnect_session (a); @@ -552,6 +558,7 @@ echo_clients_detach () int rv; da->app_index = ecm->app_index; + da->api_client_index = ~0; rv = vnet_application_detach (da); ecm->test_client_attached = 0; ecm->app_index = ~0; |