summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket1.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-19 02:00:04 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-19 02:00:04 +0000
commitb7a20454ce09b3e8f81ca76d86b45993e3be0a86 (patch)
tree1db9c2e920350b36610e098dd7fab54a24f7eaf8 /src/modules/m_spanningtree/treesocket1.cpp
parente1a9c3a9bc1e8afc90548a10f714c3f30794a9ec (diff)
Implement timeout on outgoing server connections as per our docs <link:timeout>
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10558 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 589e05bcd..09c3158cc 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -43,6 +43,7 @@ TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string sh
theirchallenge.clear();
ourchallenge.clear();
this->LinkState = CONNECTING;
+ Utils->timeoutlist[this] = std::pair<std::string, int>(ServerName,maxtime);
if (Hook)
BufferedSocketHookRequest(this, (Module*)Utils->Creator, Hook).Send();
}
@@ -81,6 +82,7 @@ TreeSocket::~TreeSocket()
{
if (Hook)
BufferedSocketUnhookRequest(this, (Module*)Utils->Creator, Hook).Send();
+ Utils->timeoutlist.erase(this);
}
/** When an outbound connection finishes connecting, we receive