aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorDag Robole <dag.robole@gmail.com>2017-07-18 16:24:46 +0200
committerDag Robole <dag.robole@gmail.com>2017-07-22 09:11:55 +0200
commit05e023f2ec8d8dc37bb0f20db1c606f06aea69f5 (patch)
tree5b54cc8b64fef391f266edc3d9833a6d98277030 /src/net.cpp
parent7b6e8bc4424006119dc537699c8b3b3121e0b3c3 (diff)
downloadbitcoin-05e023f2ec8d8dc37bb0f20db1c606f06aea69f5.tar.xz
Move CloseSocket out of SetSocketNonBlocking and pass SOCKET by const reference in SetSocket* functions
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 5bf3af7ea3..0994af3021 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -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;