diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-04-13 16:43:04 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-05-18 16:40:13 +0200 |
commit | b2733ab6a85b234a88b83bdc77a0d043e18385b3 (patch) | |
tree | 89ebd1d42740c4923a7682b852668078136574dd /src/net.cpp | |
parent | 3ad7de225efce3e76530f56bee8a8f7a75ea0f3c (diff) |
net: add new method Sock::Listen() that wraps listen()
This will help to increase `Sock` usage and make more code mockable.
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 0bf0f58828..363ae062d8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2408,7 +2408,7 @@ bool CConnman::BindListenPort(const CService& addrBind, bilingual_str& strError, LogPrintf("Bound to %s\n", addrBind.ToString()); // Listen for incoming connections - if (listen(sock->Get(), SOMAXCONN) == SOCKET_ERROR) + if (sock->Listen(SOMAXCONN) == SOCKET_ERROR) { strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %s)"), NetworkErrorString(WSAGetLastError())); LogPrintf("%s\n", strError.original); |