From 815986fe99d8cb6d1a41224281da055194caa8e2 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 8 Apr 2019 14:06:05 +0200 Subject: [PATCH] poll events are bitmasks, not values --- pdns/pollmplexer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/pollmplexer.cc b/pdns/pollmplexer.cc index 8e3e8b1d3..edf53e45e 100644 --- a/pdns/pollmplexer.cc +++ b/pdns/pollmplexer.cc @@ -128,7 +128,7 @@ int PollFDMultiplexer::run(struct timeval* now, int timeout) d_inrun=true; for(const auto& pollfd : pollfds) { - if(pollfd.revents == POLLIN) { + if(pollfd.revents & POLLIN) { d_iter=d_readCallbacks.find(pollfd.fd); if(d_iter != d_readCallbacks.end()) { @@ -136,7 +136,7 @@ int PollFDMultiplexer::run(struct timeval* now, int timeout) continue; // so we don't refind ourselves as writable! } } - else if(pollfd.revents == POLLOUT) { + else if(pollfd.revents & POLLOUT) { d_iter=d_writeCallbacks.find(pollfd.fd); if(d_iter != d_writeCallbacks.end()) { -- 2.40.0