diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-19 02:00:04 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-19 02:00:04 +0000 |
commit | b7a20454ce09b3e8f81ca76d86b45993e3be0a86 (patch) | |
tree | 1db9c2e920350b36610e098dd7fab54a24f7eaf8 /src/modules/m_spanningtree/treesocket1.cpp | |
parent | e1a9c3a9bc1e8afc90548a10f714c3f30794a9ec (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.cpp | 2 |
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 |