summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r--src/network/network.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 3a33e5096..f8138bbbc 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -589,9 +589,13 @@ void NetworkClose(bool close_admins)
ServerNetworkAdminSocketHandler::CloseListeners();
_network_coordinator_client.CloseConnection();
- } else if (MyClient::my_client != nullptr) {
- MyClient::SendQuit();
- MyClient::my_client->CloseConnection(NETWORK_RECV_STATUS_CLIENT_QUIT);
+ } else {
+ if (MyClient::my_client != nullptr) {
+ MyClient::SendQuit();
+ MyClient::my_client->CloseConnection(NETWORK_RECV_STATUS_CLIENT_QUIT);
+ }
+
+ _network_coordinator_client.CloseAllTokens();
}
TCPConnecter::KillAll();