Also squish some silly error output on unloading spanningtree.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7529
e03df62e-2008-0410-955e-
edbf42e46eb7
* @return The return value for this function is undefined.
*/
int Run();
+
+ /** Force all InspSockets to be removed which are due to
+ * be culled.
+ */
+ void InspSocketCull();
};
#endif
GlobalCulls.Apply();
/* If any inspsockets closed, remove them */
+ this->InspSocketCull();
+}
+
+void InspIRCd::InspSocketCull()
+{
for (std::map<InspSocket*,InspSocket*>::iterator x = SocketCull.begin(); x != SocketCull.end(); ++x)
{
SE->DelFd(x->second);
for (size_t i = 0; i < httpsocks.size(); i++)
{
ServerInstance->SE->DelFd(httpsocks[i]);
+ httpsocks[i]->Close();
delete httpsocks[i]->GetIndex();
- delete httpsocks[i];
}
+ ServerInstance->InspSocketCull();
}
virtual Version GetVersion()
{
Link* MyLink;
+ if (this->LinkState == LISTENER)
+ return;
+
switch (e)
{
case I_ERR_CONNECT:
void TreeSocket::OnClose()
{
+ if (this->LinkState == LISTENER)
+ return;
+
// Connection closed.
// If the connection is fully up (state CONNECTED)
// then propogate a netsplit to all peers.
}
}
delete TreeRoot;
+ ServerInstance->InspSocketCull();
}
void SpanningTreeUtilities::AddThisServer(TreeServer* server, TreeServerList &list)