diff --git a/renderdoc/os/posix/posix_network.cpp b/renderdoc/os/posix/posix_network.cpp index 7d722fcfc..2e8fcb572 100644 --- a/renderdoc/os/posix/posix_network.cpp +++ b/renderdoc/os/posix/posix_network.cpp @@ -311,7 +311,7 @@ Socket *CreateClientSocket(const char *host, uint16_t port, int timeoutMS) timeval timeout; timeout.tv_sec = (timeoutMS / 1000); timeout.tv_usec = (timeoutMS % 1000) * 1000; - result = select(0, NULL, &set, NULL, &timeout); + result = select(s + 1, NULL, &set, NULL, &timeout); if(result <= 0) { @@ -319,22 +319,13 @@ Socket *CreateClientSocket(const char *host, uint16_t port, int timeoutMS) close(s); continue; } - else - { - RDCDEBUG("connect before timeout"); - } } else { - RDCDEBUG("problem other than blocking"); close(s); continue; } } - else - { - RDCDEBUG("connected immediately"); - } int nodelay = 1; setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, sizeof(nodelay)); diff --git a/renderdoc/os/win32/win32_network.cpp b/renderdoc/os/win32/win32_network.cpp index 6078d9b83..ed8002512 100644 --- a/renderdoc/os/win32/win32_network.cpp +++ b/renderdoc/os/win32/win32_network.cpp @@ -326,7 +326,7 @@ Socket *CreateClientSocket(const char *host, uint16_t port, int timeoutMS) timeval timeout; timeout.tv_sec = (timeoutMS / 1000); timeout.tv_usec = (timeoutMS % 1000) * 1000; - result = select(0, NULL, &set, NULL, &timeout); + result = select((int)s + 1, NULL, &set, NULL, &timeout); if(result <= 0) { @@ -334,22 +334,13 @@ Socket *CreateClientSocket(const char *host, uint16_t port, int timeoutMS) closesocket(s); continue; } - else - { - RDCDEBUG("connect before timeout"); - } } else { - RDCDEBUG("problem other than blocking"); closesocket(s); continue; } } - else - { - RDCDEBUG("connected immediately"); - } BOOL nodelay = TRUE; setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (const char *)&nodelay, sizeof(nodelay));