Fix duplicate messages when a server connection errors.

This commit is contained in:
Sadie Powell 2022-02-01 11:06:21 +00:00
parent 63aa0a11e0
commit 3ff3810ca1

View File

@ -419,8 +419,8 @@ void TreeSocket::Close()
// then propagate a netsplit to all peers. // then propagate a netsplit to all peers.
if (MyRoot) if (MyRoot)
MyRoot->SQuit(getError(), true); MyRoot->SQuit(getError(), true);
else
ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\002%s\002' failed.", linkID.c_str()); ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\002%s\002' failed.", linkID.c_str());
time_t server_uptime = ServerInstance->Time() - this->age; time_t server_uptime = ServerInstance->Time() - this->age;
if (server_uptime) if (server_uptime)