diff options
author | Florin Coras <fcoras@cisco.com> | 2022-03-30 16:08:25 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-31 15:43:28 +0000 |
commit | d04ea4443ffedcb3f07bb0accfdbf2da2b8911f4 (patch) | |
tree | 5c8fc20c14fdb427e4905556e44693f3eaa3b808 /src/vcl/vcl_private.c | |
parent | 8a4a7c216a7db3f06a2221290129aaba81a44bb9 (diff) |
vcl: fix api detach if attach failed
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd1df83bb01951c2455b23c08e3cc1fcd9b91064
Diffstat (limited to 'src/vcl/vcl_private.c')
-rw-r--r-- | src/vcl/vcl_private.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c index 95cc0bfc3f4..589380d27aa 100644 --- a/src/vcl/vcl_private.c +++ b/src/vcl/vcl_private.c @@ -138,6 +138,9 @@ vcl_api_app_worker_add (void) void vcl_api_app_worker_del (vcl_worker_t * wrk) { + if (wrk->api_client_handle == ~0) + return; + if (vcm->cfg.vpp_app_socket_api) return vcl_sapi_app_worker_del (wrk); @@ -249,6 +252,7 @@ vcl_worker_alloc_and_init () wrk = vcl_worker_alloc (); vcl_set_worker_index (wrk->wrk_index); + wrk->api_client_handle = ~0; wrk->thread_id = pthread_self (); wrk->current_pid = getpid (); |