PollSet behaves differently on windows #2313

This commit is contained in:
Alex Fabijanic
2018-05-02 10:52:57 -05:00
parent 2c445f3fb1
commit 82c88a238c
4 changed files with 16 additions and 16 deletions

View File

@@ -117,14 +117,16 @@ bool SocketReactor::hasSocketHandlers()
{
ScopedLock lock(_mutex);
if (_pollSet.empty()) return false;
for (EventHandlerMap::iterator it = _handlers.begin(); it != _handlers.end(); ++it)
if (!_pollSet.empty())
{
if (it->second->accepts(_pReadableNotification) ||
it->second->accepts(_pWritableNotification) ||
it->second->accepts(_pErrorNotification)) return true;
for (EventHandlerMap::iterator it = _handlers.begin(); it != _handlers.end(); ++it)
{
if (it->second->accepts(_pReadableNotification) ||
it->second->accepts(_pWritableNotification) ||
it->second->accepts(_pErrorNotification)) return true;
}
}
return false;
}