aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vpp-api/vapi/vapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c
index 61801fc3726..c818ab0bbec 100644
--- a/src/vpp-api/vapi/vapi.c
+++ b/src/vpp-api/vapi/vapi.c
@@ -1627,7 +1627,8 @@ vapi_wait (vapi_ctx_t ctx)
return VAPI_ENOTSUP;
svm_queue_lock (ctx->vl_input_queue);
- svm_queue_wait (ctx->vl_input_queue);
+ if (ctx->vl_input_queue->cursize == 0)
+ svm_queue_wait (ctx->vl_input_queue);
svm_queue_unlock (ctx->vl_input_queue);
return VAPI_OK;