diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2020-02-10 11:47:27 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-10 19:31:00 +0000 |
commit | 3ec37826afdf559ee038b83db7a3da9757bdf366 (patch) | |
tree | 5f5b96bae1e8e80bceed6903fea6f0ff657ef663 /src/mongo/util/net/sock.cpp | |
parent | 32770d4dcb8317dc7c4f03fe120fc5682821d137 (diff) | |
download | mongo-3ec37826afdf559ee038b83db7a3da9757bdf366.tar.gz |
SERVER-44736 Raise Windows minimum to 8
Diffstat (limited to 'src/mongo/util/net/sock.cpp')
-rw-r--r-- | src/mongo/util/net/sock.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp index 02e08eb7af4..03b626f4da1 100644 --- a/src/mongo/util/net/sock.cpp +++ b/src/mongo/util/net/sock.cpp @@ -63,7 +63,6 @@ #include "mongo/util/fail_point.h" #include "mongo/util/hex.h" #include "mongo/util/log.h" -#include "mongo/util/net/private/socket_poll.h" #include "mongo/util/net/socket_exception.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/net/ssl_manager.h" @@ -174,6 +173,19 @@ SockAddr getLocalAddrForBoundSocketFd(int fd) { return result; } +#ifdef _WIN32 + +int socketPoll(pollfd* fdarray, unsigned long nfds, int timeout) { + return WSAPoll(fdarray, nfds, timeout); +} + +#else + +int socketPoll(pollfd* fdarray, unsigned long nfds, int timeout) { + return ::poll(fdarray, nfds, timeout); +} +#endif + } // namespace #ifdef MSG_NOSIGNAL @@ -606,8 +618,6 @@ bool Socket::isStillConnected() { if (errorPollIntervalSecs < 0) return true; - if (!isPollSupported()) - return true; // nothing we can do time_t now = time(nullptr); time_t idleTimeSecs = now - _lastValidityCheckAtSecs; |