mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Test whether created sockets are select()able
This commit is contained in:
@@ -266,6 +266,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);
|
||||
|
||||
Reference in New Issue
Block a user