diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2015-07-09 18:23:27 -0400 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-07-20 17:29:44 +0200 |
commit | 0739e6e57a4b59966588a79ac2646eb3264c4dfa (patch) | |
tree | 02ba47d716ca8ec4da6edbd7a28953d4c049957d /src/netbase.cpp | |
parent | 255eced936a484de1ce3b5ef6893327b92df0a93 (diff) | |
download | bitcoin-0739e6e57a4b59966588a79ac2646eb3264c4dfa.tar.xz |
Test whether created sockets are select()able
Conflicts:
src/net.cpp
Github-Pull: #6412
Rebased-From: d422f9b1fdb42a51aadaa1bbc157542dca2feb17
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index d7c263f347..7f20cd05ec 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -267,6 +267,9 @@ bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSock } else { // Other error or blocking int nErr = WSAGetLastError(); if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL) { + if (!IsSelectableSocket(hSocket)) { + return false; + } struct timeval tval = MillisToTimeval(std::min(endTime - curTime, maxWait)); fd_set fdset; FD_ZERO(&fdset); |