small net cleanup
- add comment for disabling sigpipe - add closing comment in compat.h - remove redundant check in net.h
This commit is contained in:
parent
8833acc4c9
commit
efd6b87811
3 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||||
// Copyright (c) 2009-2013 The Bitcoin developers
|
// Copyright (c) 2009-2014 The Bitcoin developers
|
||||||
// Distributed under the MIT/X11 software license, see the accompanying
|
// Distributed under the MIT/X11 software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -59,4 +59,4 @@ typedef u_int SOCKET;
|
||||||
#define SOCKET_ERROR -1
|
#define SOCKET_ERROR -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // _BITCOIN_COMPAT_H
|
||||||
|
|
|
@ -356,12 +356,11 @@ public:
|
||||||
|
|
||||||
~CNode()
|
~CNode()
|
||||||
{
|
{
|
||||||
if (hSocket != INVALID_SOCKET)
|
CloseSocket(hSocket);
|
||||||
{
|
|
||||||
CloseSocket(hSocket);
|
|
||||||
}
|
|
||||||
if (pfilter)
|
if (pfilter)
|
||||||
delete pfilter;
|
delete pfilter;
|
||||||
|
|
||||||
GetNodeSignals().FinalizeNode(GetId());
|
GetNodeSignals().FinalizeNode(GetId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -334,6 +334,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
|
||||||
|
|
||||||
#ifdef SO_NOSIGPIPE
|
#ifdef SO_NOSIGPIPE
|
||||||
int set = 1;
|
int set = 1;
|
||||||
|
// Different way of disabling SIGPIPE on BSD
|
||||||
setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int));
|
setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue