diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-03-05 17:01:59 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-03-16 13:58:23 +0100 |
commit | 82d360b5a88d9057b6c09b61cd69e426c7a2412d (patch) | |
tree | 8a60f973c2155fa870c30e7919e869cdaee36d0c /src/net.cpp | |
parent | b5861100f85fef77b00f55dcdf01ffb4a2a112d8 (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.cpp | 2 |
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) { |