aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vcl/ldp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 3d4c01c7833..9e01ac95bec 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -2567,7 +2567,7 @@ ldp_epoll_pwait_eventfd (int epfd, struct epoll_event *events,
int maxevents, int timeout, const sigset_t * sigmask)
{
ldp_worker_ctx_t *ldpw;
- int libc_epfd, rv = 0, num_ev;
+ int libc_epfd, rv = 0, num_ev, vcl_wups = 0;
vls_handle_t ep_vlsh;
ldp_init_check ();
@@ -2651,6 +2651,7 @@ ldp_epoll_pwait_eventfd (int epfd, struct epoll_event *events,
goto done;
}
+epoll_again:
rv = libc_epoll_pwait (libc_epfd, events, maxevents, timeout, sigmask);
if (rv <= 0)
goto done;
@@ -2668,6 +2669,9 @@ ldp_epoll_pwait_eventfd (int epfd, struct epoll_event *events,
num_ev = vls_epoll_wait (ep_vlsh, &events[rv], maxevents - rv, 0);
if (PREDICT_TRUE (num_ev > 0))
rv += num_ev;
+ /* Woken up by vcl but no events generated. Accept it once */
+ if (rv == 0 && vcl_wups++ < 1)
+ goto epoll_again;
break;
}
}