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.
This commit is contained in:
Willy Tarreau 2019-12-26 11:09:43 +01:00
parent 0fbc318e24
commit 19689882e6

View File

@ -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