aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vcl_private.c')
-rw-r--r--src/vcl/vcl_private.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index b14fdeea454..6e887c878cd 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -158,11 +158,19 @@ vcl_worker_cleanup (vcl_worker_t * wrk, u8 notify_vpp)
clib_spinlock_lock (&vcm->workers_lock);
if (notify_vpp)
{
+ /* Notify vpp that the worker is going away */
if (wrk->wrk_index == vcl_get_worker_index ())
vcl_send_app_worker_add_del (0 /* is_add */ );
else
vcl_send_child_worker_del (wrk);
+
+ /* Disconnect the binary api */
+ if (vec_len (vcm->workers) == 1)
+ vppcom_disconnect_from_vpp ();
+ else
+ vl_client_send_disconnect (1 /* vpp should cleanup */ );
}
+
if (wrk->mqs_epfd > 0)
close (wrk->mqs_epfd);
hash_free (wrk->session_index_by_vpp_handles);