]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Wait longer before sending data on the connect than on the accept
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index 0451b5dd418a0075c28be151da97a39ca0835ded..acc6c7fe2f4cf9fa22d3a18b848f1f928cfda414 100644 (file)
@@ -35,6 +35,7 @@
 
 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_hash.h */
 
+
 /** Because most of the I/O gubbins are encapsulated within
  * InspSocket, we just call the superclass constructor for
  * most of the action, and append a few of our own values
@@ -73,12 +74,9 @@ TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, int newfd, cha
         * socket, and set a timer waiting for handshake before we send CAPAB etc.
         */
        if (Hook)
-       {
                InspSocketHookRequest(this, (Module*)Utils->Creator, Hook).Send();
-               Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(Utils->LinkBlocks[0]), this->Utils));
-       }
-       else
-               this->SendCapabilities();
+
+       Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(Utils->LinkBlocks[0]), this->Utils, 1));
 }
 
 ServerState TreeSocket::GetLinkState()
@@ -183,7 +181,7 @@ bool TreeSocket::OnConnected()
                                }
                                this->OutboundPass = x->SendPass;
                                /* found who we're supposed to be connecting to, send the neccessary gubbins. */
-                               Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(*x), this->Utils));
+                               Instance->Timers->AddTimer(new HandshakeTimer(Instance, this, &(*x), this->Utils, 2));
                                return true;
                        }
                }