bool RecvLine(SOCKET hSocket, string& strLine)
{
strLine = "";
- while (true)
+ for ( ; ; )
{
char c;
int nBytes = recv(hSocket, &c, 1, 0);
{
printf("ThreadSocketHandler started\n");
size_t nPrevNodeCount = 0;
- while (true)
+ for ( ; ; )
{
//
// Disconnect nodes
// Initiate network connections
int64_t nStart = GetTime();
- while (true)
+ for ( ; ; )
{
ProcessOneShot();
int64_t nANow = GetAdjustedTime();
int nTries = 0;
- while (true)
+ for ( ; ; )
{
// use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections)
CAddress addr = addrman.Select(10 + min(nOutbound,8)*10);
if (semOutbound)
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
semOutbound->post();
- do
+ for ( ; ; )
{
int nThreadsRunning = 0;
for (int n = 0; n < THREAD_MAX; n++)
if (GetTime() - nStart > 20)
break;
Sleep(20);
- } while(true);
+ };
if (vnThreadsRunning[THREAD_SOCKETHANDLER] > 0) printf("ThreadSocketHandler still running\n");
if (vnThreadsRunning[THREAD_OPENCONNECTIONS] > 0) printf("ThreadOpenConnections still running\n");
if (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0) printf("ThreadMessageHandler still running\n");