aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-02-01 19:21:05 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-01 19:21:49 +0100
commit84291d18dd69e0baff766d256a3f45f910be55e9 (patch)
tree03d9a1dcbe0a5fcef8f18ce5f859f3e57395550a /src/net.cpp
parent895fbd768f0c89cea3f78acac58b233d4e3a145e (diff)
parent96dbd381cf0ded169406bab3b1ba911a13d563c5 (diff)
Merge #12326: net: initialize socket to avoid closing random fd's
96dbd38 net: initialize socket to avoid closing random fd's (Cory Fields) Pull request description: An excellent spot by @david60. Even if it isn't causing the fd issue we're looking for, this should be fixed. Tree-SHA512: 062a8f2cdd39d895213e1263dbd7b8391473ddaea2f93c82c211a9bb6ea6744d48a6c84c8ff804b16b865d14145492635c500a9fd138d0988fee5e4f719ebb91
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 8111390749..f407add091 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -410,7 +410,7 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
// Connect
bool connected = false;
- SOCKET hSocket;
+ SOCKET hSocket = INVALID_SOCKET;
proxyType proxy;
if (addrConnect.IsValid()) {
bool proxyConnectionFailed = false;