|
|
|
@ -827,7 +827,6 @@ void ThreadSocketHandler()
@@ -827,7 +827,6 @@ void ThreadSocketHandler()
|
|
|
|
|
uiInterface.NotifyNumConnectionsChanged(nPrevNodeCount); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Find which sockets have data to receive
|
|
|
|
|
//
|
|
|
|
@ -849,6 +848,7 @@ void ThreadSocketHandler()
@@ -849,6 +848,7 @@ void ThreadSocketHandler()
|
|
|
|
|
hSocketMax = max(hSocketMax, hListenSocket); |
|
|
|
|
have_fds = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
LOCK(cs_vNodes); |
|
|
|
|
BOOST_FOREACH(CNode* pnode, vNodes) |
|
|
|
@ -909,11 +909,11 @@ void ThreadSocketHandler()
@@ -909,11 +909,11 @@ void ThreadSocketHandler()
|
|
|
|
|
MilliSleep(timeout.tv_usec/1000); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Accept new connections
|
|
|
|
|
//
|
|
|
|
|
BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) |
|
|
|
|
{ |
|
|
|
|
if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv)) |
|
|
|
|
{ |
|
|
|
|
struct sockaddr_storage sockaddr; |
|
|
|
@ -953,13 +953,14 @@ void ThreadSocketHandler()
@@ -953,13 +953,14 @@ void ThreadSocketHandler()
|
|
|
|
|
LogPrint("net", "accepted connection %s\n", addr.ToString()); |
|
|
|
|
CNode* pnode = new CNode(hSocket, addr, "", true); |
|
|
|
|
pnode->AddRef(); |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
LOCK(cs_vNodes); |
|
|
|
|
vNodes.push_back(pnode); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Service each socket
|
|
|
|
|