Skip to content

Commit

Permalink
Prevent socket leak in ThreadSocketHandler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed Jul 19, 2014
1 parent e14dc29 commit fbec842
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/net.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -830,11 +830,7 @@ void ThreadSocketHandler2(void* parg)
} }
else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS) else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS)
{ {
{ closesocket(hSocket);
LOCK(cs_setservAddNodeAddresses);
if (!setservAddNodeAddresses.count(addr))
closesocket(hSocket);
}
} }
else if (CNode::IsBanned(addr)) else if (CNode::IsBanned(addr))
{ {
Expand Down

0 comments on commit fbec842

Please sign in to comment.