diff --git a/src/universe.cpp b/src/universe.cpp index f6f1bdfe034f4f7d08fd0c7166659c4976855c3c..e0d4feb50d55b487bc187df34dcfc830106e3464 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -299,8 +299,13 @@ socket_t Universe::_setDescriptors() { auto sock = l->fd(); if (sock != INVALID_SOCKET) { pollfd fdentry; + #ifdef WIN32 + fdentry.events = POLLIN; + #else fdentry.events = POLLIN | POLLERR; + #endif fdentry.fd = sock; + fdentry.revents = 0; impl_->pollfds.push_back(fdentry); impl_->idMap[sock] = impl_->pollfds.size() - 1; @@ -318,8 +323,13 @@ socket_t Universe::_setDescriptors() { n = std::max<socket_t>(n, sock); if (sock != INVALID_SOCKET) { pollfd fdentry; + #ifdef WIN32 + fdentry.events = POLLIN; + #else fdentry.events = POLLIN | POLLERR; + #endif fdentry.fd = sock; + fdentry.revents = 0; impl_->pollfds.push_back(fdentry); impl_->idMap[sock] = impl_->pollfds.size() - 1;