From 19689882e61d33655a259a7a3707edee1866323e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 26 Dec 2019 11:09:43 +0100 Subject: [PATCH] MINOR: poller: do not call the IO handler if the FD is not active For now this almost never happens but with subsequent patches it will become more important not to uselessly call the I/O handlers if the FD is not active. --- include/proto/fd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/proto/fd.h b/include/proto/fd.h index 8dd64a5b3..a50748572 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -358,7 +358,7 @@ static inline void fd_update_events(int fd, unsigned char evts) if (fdtab[fd].ev & (FD_POLL_OUT | FD_POLL_ERR)) fd_may_send(fd); - if (fdtab[fd].iocb) + if (fdtab[fd].iocb && fd_active(fd)) fdtab[fd].iocb(fd); ti->flags &= ~TI_FL_STUCK; // this thread is still running