summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket1.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-09 21:31:50 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-09 21:31:50 +0000
commitae4c387422251da208c4b5492a9ebe72d524805e (patch)
treeed0f691b93956230adc3ca1bbac1ba4358274b2a /src/modules/m_spanningtree/treesocket1.cpp
parentb6a5e2bd143cdd2fc610f79c87729d2e211da7ff (diff)
Move autoconnect next-server to TreeSocket::cull, and drop autoconnect reference once a connection is complete
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 432ee2a09..7e62d6a2c 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -106,6 +106,8 @@ void TreeSocket::CleanNegotiationInfo()
bool TreeSocket::cull()
{
Utils->timeoutlist.erase(this);
+ if (myautoconnect)
+ Utils->Creator->ConnectServer(myautoconnect, false);
return this->BufferedSocket::cull();
}
@@ -150,7 +152,6 @@ void TreeSocket::OnError(BufferedSocketError e)
{
case I_ERR_CONNECT:
ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Connection to \002%s\002 refused", myhost.c_str());
- Utils->Creator->ConnectServer(myautoconnect);
break;
case I_ERR_SOCKET:
ServerInstance->SNO->WriteToSnoMask('l', "Connection failed: Could not create socket (%s)", strerror(errno));