mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Move CloseSocket out of SetSocketNonBlocking and pass SOCKET by const reference in SetSocket* functions
This commit is contained in:
parent
7b6e8bc442
commit
05e023f2ec
4 changed files with 10 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue