gah... real fix for 100% CPU issue. not sure why my tests showed the previous fix working

This commit is contained in:
Josh Faust 2010-07-01 03:40:46 +00:00
parent a62458e977
commit 26abe0d111
1 changed files with 6 additions and 5 deletions

View File

@ -235,13 +235,14 @@ void PollSet::update(int poll_timeout)
// If these are registered events for this socket, OR the events are ERR/HUP/NVAL,
// call through to the registered function
int revents = ufds_[i].revents;
if (func
&& ((events & ufds_[i].revents)
|| (events & POLLERR)
|| (events & POLLHUP)
|| (events & POLLNVAL)))
&& ((events & revents)
|| (revents & POLLERR)
|| (revents & POLLHUP)
|| (revents & POLLNVAL)))
{
func(ufds_[i].revents & events);
func(revents & (events|POLLERR|POLLHUP|POLLNVAL));
}
ufds_[i].revents = 0;