Bugfix: Don't consider invalid listening socket in hSocketMax

Fixed upstream in 8f10a28890.
This commit is contained in:
Luke Dashjr
2012-09-10 23:40:27 +00:00
parent c1124277c5
commit 1ce15535f0
+3 -1
View File
@@ -843,8 +843,10 @@ void ThreadSocketHandler2(void* parg)
SOCKET hSocketMax = 0;
if(hListenSocket != INVALID_SOCKET)
{
FD_SET(hListenSocket, &fdsetRecv);
hSocketMax = max(hSocketMax, hListenSocket);
hSocketMax = max(hSocketMax, hListenSocket);
}
CRITICAL_BLOCK(cs_vNodes)
{
BOOST_FOREACH(CNode* pnode, vNodes)