mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Move CloseSocket out of SetSocketNonBlocking and pass SOCKET by const reference in SetSocket* functions
This commit is contained in:
@@ -2076,6 +2076,7 @@ bool CConnman::BindListenPort(const CService &addrBind, std::string& strError, b
|
||||
|
||||
// Set to non-blocking, incoming connections will also inherit this
|
||||
if (!SetSocketNonBlocking(hListenSocket, true)) {
|
||||
CloseSocket(hListenSocket);
|
||||
strError = strprintf("BindListenPort: Setting listening socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
|
||||
LogPrintf("%s\n", strError);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user