summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-25 16:47:10 -0400
committerAdam <Adam@anope.org>2014-04-25 16:47:10 -0400
commit4fa2a00bd595eb120e6acde5eb167759c2018e33 (patch)
tree60152fcf082152a1b66881957d5d94ef8e114a6b
parent82008d507cccbf24c73502bc97bc492d21305549 (diff)
Close timed out proxyscan sockets better
-rw-r--r--modules/m_proxyscan.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/m_proxyscan.cpp b/modules/m_proxyscan.cpp
index 98178260c..0fe4ade27 100644
--- a/modules/m_proxyscan.cpp
+++ b/modules/m_proxyscan.cpp
@@ -206,12 +206,13 @@ class ModuleProxyScan : public Module
void Tick(time_t) anope_override
{
- for (std::set<ProxyConnect *>::iterator it = ProxyConnect::proxies.begin(), it_end = ProxyConnect::proxies.end(); it != it_end; ++it)
+ for (std::set<ProxyConnect *>::iterator it = ProxyConnect::proxies.begin(), it_end = ProxyConnect::proxies.end(); it != it_end;)
{
ProxyConnect *p = *it;
+ ++it;
if (p->created + this->GetSecs() < Anope::CurTime)
- p->flags[SF_DEAD] = true;
+ delete p;
}
}
} connectionTimeout;