diff options
| author | Dag Robole <[email protected]> | 2017-07-18 16:24:46 +0200 |
|---|---|---|
| committer | Dag Robole <[email protected]> | 2017-07-22 09:11:55 +0200 |
| commit | 05e023f2ec8d8dc37bb0f20db1c606f06aea69f5 (patch) | |
| tree | 5b54cc8b64fef391f266edc3d9833a6d98277030 /src/net.cpp | |
| parent | Merge #10795: No longer ever reuse keypool indexes (diff) | |
| download | discoin-05e023f2ec8d8dc37bb0f20db1c606f06aea69f5.tar.xz discoin-05e023f2ec8d8dc37bb0f20db1c606f06aea69f5.zip | |
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.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 5bf3af7ea..0994af302 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; |