summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-30 02:59:55 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 08:50:04 +0000
commitb2ed95896f5e40b31a87c81e7f27012fba00a9c1 (patch)
tree10bbc06df1e019b8b5da4a24168750751a225e6c
parent9ba15e2b6812fb6a87c86acae77f1226d264e254 (diff)
vcl: disconnect both flavors of bapi transport on destroy
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6697296b45c5816a31535b0cf44b8e726292b8bb (cherry picked from commit dc0ded7dd7a6b8ee68df25cd56666de804e55e64)
-rw-r--r--src/vcl/vppcom.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index befaf155692..a50d0abf2f4 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1090,8 +1090,8 @@ vppcom_app_create (char *app_name)
void
vppcom_app_destroy (void)
{
+ vcl_worker_t *wrk, *current_wrk;
struct dlmallinfo mi;
- vcl_worker_t *wrk;
mspace heap;
if (!pool_elts (vcm->workers))
@@ -1099,16 +1099,19 @@ vppcom_app_destroy (void)
vcl_evt (VCL_EVT_DETACH, vcm);
- vcl_send_app_detach (vcl_worker_get_current ());
+ current_wrk = vcl_worker_get_current ();
/* *INDENT-OFF* */
pool_foreach (wrk, vcm->workers, ({
- if (pool_elts (vcm->workers) == 1)
- vl_client_disconnect_from_vlib ();
- vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
+ if (current_wrk != wrk)
+ vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
}));
/* *INDENT-ON* */
+ vcl_send_app_detach (current_wrk);
+ vppcom_disconnect_from_vpp ();
+ vcl_worker_cleanup (current_wrk, 0 /* notify vpp */ );
+
vcl_elog_stop (vcm);
/*