From 8c8237a4a10feb2ac9ce46f67b5d14bf879b670f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 22 Apr 2021 17:30:35 +0300 Subject: [PATCH] net, refactor: Fix style in CConnman::StopNodes --- src/net.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 2cb95516a48b3..a8e07a567def0 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);