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/i2p.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/i2p.cpp')
-rw-r--r-- | src/i2p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp index d16c620d88..13e7ce3515 100644 --- a/src/i2p.cpp +++ b/src/i2p.cpp @@ -279,7 +279,7 @@ Sock Session::Hello() const throw std::runtime_error("Cannot create socket"); } - if (!ConnectSocketDirectly(m_control_host, sock->Get(), nConnectTimeout, true)) { + if (!ConnectSocketDirectly(m_control_host, *sock, nConnectTimeout, true)) { throw std::runtime_error(strprintf("Cannot connect to %s", m_control_host.ToString())); } |