From: Florin Coras Date: Thu, 12 Jun 2025 04:45:12 +0000 (-0400) Subject: vcl: avoid reading fifo if vcl detached from vpp X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F43149%2F2;p=vpp.git vcl: avoid reading fifo if vcl detached from vpp Type: fix Change-Id: Ie357602140993244e81edb97fac48339a88ecbe8 Signed-off-by: Florin Coras --- diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 9aff1e6ccd3..ee249b36dac 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -2126,6 +2126,7 @@ vppcom_session_read_internal (uint32_t session_handle, void *buf, int n, rx_fifo = vcl_session_is_ct (s) ? s->ct_rx_fifo : s->rx_fifo; /* If application closed, e.g., mt app, or no data return error */ if (s->session_state == VCL_STATE_CLOSED || + (s->flags & VCL_SESSION_F_APP_CLOSING) || svm_fifo_is_empty_cons (rx_fifo)) return vcl_session_closed_error (s); }