summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-08-12 18:12:09 -0700
committerDave Barach <openvpp@barachs.net>2021-08-30 14:26:23 +0000
commit98078ab88d93de4e44427c018cd3a74fc0ce8234 (patch)
tree80151ef6ffba300d51310aa4bb9cfe2a56cc053f /src/vnet/session/session_api.c
parent18599c5861d96723359997f2c70fc28fcac0e984 (diff)
session: close app wrk socket on delete
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I54fa6e8f12bb52988888e7019a88d6891017944c
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r--src/vnet/session/session_api.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index e420099e308..e6aac953bce 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1385,7 +1385,7 @@ done:
vec_free (fds);
}
-static void
+void
sapi_socket_close_w_handle (u32 api_handle)
{
app_namespace_t *app_ns = app_namespace_get (api_handle >> 16);
@@ -1443,10 +1443,7 @@ sapi_add_del_worker_handler (app_namespace_t * app_ns,
}
if (!mp->is_add)
- {
- sapi_socket_close_w_handle (sapi_handle);
- goto done;
- }
+ goto done;
/* Send fifo segment fd if needed */
if (ssvm_type (args.segment) == SSVM_SEGMENT_MEMFD)
@@ -1573,7 +1570,6 @@ sapi_socket_detach (app_namespace_t * app_ns, clib_socket_t * cs)
u32 api_client_handle;
api_client_handle = appns_sapi_socket_handle (app_ns, cs);
- sapi_socket_close_w_handle (api_client_handle);
/* Cleanup everything because app worker closed socket or crashed */
handle = (app_ns_api_handle_t *) & cs->private_data;