mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -05:00
Fix CPU Usage bug when using -nolisten and have no connections.
This commit is contained in:
parent
352b4ea5b9
commit
c6710c7a70
1 changed files with 6 additions and 3 deletions
|
@ -756,9 +756,12 @@ void ThreadSocketHandler2(void* parg)
|
||||||
if (nSelect == SOCKET_ERROR)
|
if (nSelect == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
int nErr = WSAGetLastError();
|
int nErr = WSAGetLastError();
|
||||||
printf("socket select error %d\n", nErr);
|
if (hSocketMax > -1)
|
||||||
for (int i = 0; i <= hSocketMax; i++)
|
{
|
||||||
FD_SET(i, &fdsetRecv);
|
printf("socket select error %d\n", nErr);
|
||||||
|
for (int i = 0; i <= hSocketMax; i++)
|
||||||
|
FD_SET(i, &fdsetRecv);
|
||||||
|
}
|
||||||
FD_ZERO(&fdsetSend);
|
FD_ZERO(&fdsetSend);
|
||||||
FD_ZERO(&fdsetError);
|
FD_ZERO(&fdsetError);
|
||||||
Sleep(timeout.tv_usec/1000);
|
Sleep(timeout.tv_usec/1000);
|
||||||
|
|
Loading…
Add table
Reference in a new issue