diff options
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index 2cb95516a4..a8e07a567d 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2644,10 +2644,13 @@ void CConnman::StopNodes() } // Close listening sockets. - for (ListenSocket& hListenSocket : vhListenSocket) - if (hListenSocket.socket != INVALID_SOCKET) - if (!CloseSocket(hListenSocket.socket)) + for (ListenSocket& hListenSocket : vhListenSocket) { + if (hListenSocket.socket != INVALID_SOCKET) { + if (!CloseSocket(hListenSocket.socket)) { LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError())); + } + } + } for (CNode* pnode : vNodesDisconnected) { DeleteNode(pnode); |