diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 728890465..5f1726418 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -24,9 +24,6 @@ #elif defined(POCO_HAVE_FD_POLL) #include "Poco/SharedPtr.h" #include -typedef Poco::SharedPtr > SharedPollArray; #endif @@ -213,6 +210,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce return readList.size() + writeList.size() + exceptList.size(); #elif defined(POCO_HAVE_FD_POLL) + typedef Poco::SharedPtr > SharedPollArray; nfds_t nfd = readList.size() + writeList.size() + exceptList.size(); if (0 == nfd) return 0; diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp index 1a98a85ea..74b26eb13 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -477,6 +477,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode) } } while (rc < 0 && lastError() == POCO_EINTR); + if (rc < 0) error(); + return rc > 0; #else