Move SocketHandler logic to private method.

This commit is contained in:
Patrick Strateman 2018-09-24 17:03:17 -04:00
parent 2af9cff11a
commit 032488e6e7
2 changed files with 202 additions and 197 deletions

View File

@ -1262,13 +1262,8 @@ void CConnman::InactivityCheck(CNode *pnode)
} }
} }
void CConnman::ThreadSocketHandler() void CConnman::SocketHandler()
{ {
while (!interruptNet)
{
DisconnectNodes();
NotifyNumConnectionsChanged();
// //
// Find which sockets have data to receive // Find which sockets have data to receive
// //
@ -1465,6 +1460,15 @@ void CConnman::ThreadSocketHandler()
for (CNode* pnode : vNodesCopy) for (CNode* pnode : vNodesCopy)
pnode->Release(); pnode->Release();
} }
}
void CConnman::ThreadSocketHandler()
{
while (!interruptNet)
{
DisconnectNodes();
NotifyNumConnectionsChanged();
SocketHandler();
} }
} }

View File

@ -339,6 +339,7 @@ private:
void DisconnectNodes(); void DisconnectNodes();
void NotifyNumConnectionsChanged(); void NotifyNumConnectionsChanged();
void InactivityCheck(CNode *pnode); void InactivityCheck(CNode *pnode);
void SocketHandler();
void ThreadSocketHandler(); void ThreadSocketHandler();
void ThreadDNSAddressSeed(); void ThreadDNSAddressSeed();