diff options
| author | 2008-09-21 10:55:18 +0000 | |
|---|---|---|
| committer | 2008-09-21 10:55:18 +0000 | |
| commit | 82fdc01e33aa5e5bfb1315e811d9465f85241248 (patch) | |
| tree | 6498fd56ed8d18ebb311da7918ec463ff2ec3889 /src/modules/m_spanningtree/main.cpp | |
| parent | Fix some comment which was left over from before the conversion from User* to... (diff) | |
| download | inspircd++-82fdc01e33aa5e5bfb1315e811d9465f85241248.tar.gz inspircd++-82fdc01e33aa5e5bfb1315e811d9465f85241248.tar.bz2 inspircd++-82fdc01e33aa5e5bfb1315e811d9465f85241248.zip | |
Fix the 'i/o error on connection (no error)' stuff, by displaying 'connected closed unexpectedly' when errno == 0.
Also trigger failover whenever a connection times out in the new authentication timeout code (the connection isnt
properly established so the failover should trigger)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10575 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 264ee1078..86d511a2a 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -335,6 +335,7 @@ void ModuleSpanningTree::AutoConnectServers(time_t curtime) void ModuleSpanningTree::DoConnectTimeout(time_t curtime) { + std::vector<Link*> failovers; for (std::map<TreeSocket*, std::pair<std::string, int> >::iterator i = Utils->timeoutlist.begin(); i != Utils->timeoutlist.end(); i++) { TreeSocket* s = i->first; @@ -344,8 +345,16 @@ void ModuleSpanningTree::DoConnectTimeout(time_t curtime) ServerInstance->SNO->WriteToSnoMask('l',"CONNECT: Error connecting \002%s\002 (timeout of %d seconds)",p.first.c_str(),p.second); ServerInstance->SE->DelFd(s); s->Close(); + Link* MyLink = Utils->FindLink(p.first); + if (MyLink) + failovers.push_back(MyLink); } - } + } + /* Trigger failover for each timed out socket */ + for (std::vector<Link*>::const_iterator n = failovers.begin(); n != failovers.end(); ++n) + { + Utils->DoFailOver(*n); + } } int ModuleSpanningTree::HandleVersion(const std::vector<std::string>& parameters, User* user) |
