mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Test whether created sockets are select()able
This commit is contained in:
parent
943b322d5d
commit
d422f9b1fd
3 changed files with 29 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue