mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
net: change ConnectSocketDirectly() to take a Sock argument
Change `ConnectSocketDirectly()` to take a `Sock` argument instead of a bare `SOCKET`. With this, use the `Sock`'s (possibly mocked) methods `Connect()`, `Wait()` and `GetSockOpt()` instead of calling the OS functions directly.
This commit is contained in:
@@ -448,7 +448,7 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
|
||||
if (!sock) {
|
||||
return nullptr;
|
||||
}
|
||||
connected = ConnectSocketDirectly(addrConnect, sock->Get(), nConnectTimeout,
|
||||
connected = ConnectSocketDirectly(addrConnect, *sock, nConnectTimeout,
|
||||
conn_type == ConnectionType::MANUAL);
|
||||
}
|
||||
if (!proxyConnectionFailed) {
|
||||
|
||||
Reference in New Issue
Block a user