net: convert standalone IsSelectableSocket() to Sock::IsSelectable()

This makes the callers mockable.
This commit is contained in:
Vasil Dimov
2021-04-13 14:29:14 +02:00
parent 5db7d2ca0a
commit b4bac55679
7 changed files with 30 additions and 10 deletions

View File

@@ -961,8 +961,7 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
return;
}
if (!IsSelectableSocket(sock->Get()))
{
if (!sock->IsSelectable()) {
LogPrintf("connection from %s dropped: non-selectable socket\n", addr.ToString());
return;
}