Move SocketHandler logic to private method.
This commit is contained in:
parent
2af9cff11a
commit
032488e6e7
16
src/net.cpp
16
src/net.cpp
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue