]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket2.cpp
m_spanningtree Netburst: Remove unused parameters and variables
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket2.cpp
index e6fbad4c6dd512fda116944ac5b8e40dd303ebc3..a06ff3a67248464aeb3646527fbfb1e9948fe451 100644 (file)
@@ -484,13 +484,16 @@ void TreeSocket::Close()
        if (MyRoot)
                Squit(MyRoot,getError());
 
-       if (!linkID.empty())
+       if (!ConnectionFailureShown)
        {
+               ConnectionFailureShown = true;
                ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' failed.",linkID.c_str());
 
                time_t server_uptime = ServerInstance->Time() - this->age;
                if (server_uptime)
-                       ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' was established for %s", linkID.c_str(), Utils->Creator->TimeToStr(server_uptime).c_str());
-               linkID.clear();
+               {
+                       std::string timestr = Utils->Creator->TimeToStr(server_uptime);
+                       ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' was established for %s", linkID.c_str(), timestr.c_str());
+               }
        }
 }