mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #304 from TheBlueMatt/cpufix
Fix CPU Usage bug when using -nolisten and have no connections.
This commit is contained in:
commit
65ee333ae0
@ -756,9 +756,12 @@ void ThreadSocketHandler2(void* parg)
|
||||
if (nSelect == SOCKET_ERROR)
|
||||
{
|
||||
int nErr = WSAGetLastError();
|
||||
printf("socket select error %d\n", nErr);
|
||||
for (int i = 0; i <= hSocketMax; i++)
|
||||
FD_SET(i, &fdsetRecv);
|
||||
if (hSocketMax > -1)
|
||||
{
|
||||
printf("socket select error %d\n", nErr);
|
||||
for (int i = 0; i <= hSocketMax; i++)
|
||||
FD_SET(i, &fdsetRecv);
|
||||
}
|
||||
FD_ZERO(&fdsetSend);
|
||||
FD_ZERO(&fdsetError);
|
||||
Sleep(timeout.tv_usec/1000);
|
||||
|
Loading…
Reference in New Issue
Block a user