aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-03-05 17:01:59 +0100
committerVasil Dimov <vd@FreeBSD.org>2021-03-16 13:58:23 +0100
commit82d360b5a88d9057b6c09b61cd69e426c7a2412d (patch)
tree8a60f973c2155fa870c30e7919e869cdaee36d0c /src/net.cpp
parentb5861100f85fef77b00f55dcdf01ffb4a2a112d8 (diff)
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.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1e4a6a9aa7..36065118d7 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -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) {