aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-02-28 22:32:31 -0800
committerDave Wallace <dwallacelf@gmail.com>2023-03-01 19:27:47 +0000
commit06defbc5de0d36f5d2a1d686d5d7d24c7c8476cd (patch)
treefaa66fd02010214a2ad8fb4b1447f70d868ccfd0
parentc2a1417c5af9f29a0f267e49cfd164aa3085842c (diff)
vcl: close libc epfd on vls epfd close
Nginx recreates epfds. Make sure ldp tracks the event and recreates the libc epfd or eventfd flavor of epoll pwait will not work. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2994bead9494f0fbb85dd32767cecc1cf69ff6eb
-rw-r--r--src/vcl/ldp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 0bb81344662..3d4c01c7833 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -331,16 +331,16 @@ close (int fd)
epfd = vls_attr (vlsh, VPPCOM_ATTR_GET_LIBC_EPFD, 0, 0);
if (epfd > 0)
{
+ ldp_worker_ctx_t *ldpw = ldp_worker_get_current ();
+ u32 size = sizeof (epfd);
+
LDBG (0, "fd %d: calling libc_close: epfd %u", fd, epfd);
- rv = libc_close (epfd);
- if (rv < 0)
- {
- u32 size = sizeof (epfd);
- epfd = 0;
+ libc_close (epfd);
+ ldpw->mq_epfd_added = 0;
- (void) vls_attr (vlsh, VPPCOM_ATTR_SET_LIBC_EPFD, &epfd, &size);
- }
+ epfd = 0;
+ (void) vls_attr (vlsh, VPPCOM_ATTR_SET_LIBC_EPFD, &epfd, &size);
}
else if (PREDICT_FALSE (epfd < 0))
{