mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-30 21:00:03 -04:00
Fix multiple burst notifications in a better way (force EOB was quite often hitting in too quickly, will only trigger on servers not EOB after 60 seconds now)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9358 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
645f0aa634
commit
d21682a3a0
@ -218,20 +218,28 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cancel remote burst mode on any servers which still have it enabled due to latency/lack of data.
|
* Cancel remote burst mode on any servers which still have it enabled due to latency/lack of data.
|
||||||
* This prevents lost REMOTECONNECT notices
|
* This prevents lost REMOTECONNECT notices
|
||||||
* XXX this should probably not do this until server has been bursting for, say, 60 seconds or something
|
|
||||||
*/
|
*/
|
||||||
|
timeval t;
|
||||||
|
gettimeofday(&t, NULL);
|
||||||
|
long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
|
||||||
|
|
||||||
for (server_hash::iterator i = Utils->serverlist.begin(); i != Utils->serverlist.end(); i++)
|
for (server_hash::iterator i = Utils->serverlist.begin(); i != Utils->serverlist.end(); i++)
|
||||||
{
|
{
|
||||||
if (i->second->bursting)
|
if (i->second->bursting)
|
||||||
|
{
|
||||||
|
unsigned long bursttime = ts - i->second->StartBurst;
|
||||||
|
if (bursttime > 60000) // A minute
|
||||||
{
|
{
|
||||||
ServerInstance->SNO->WriteToSnoMask('l',"Server \002%s\002 has not finished burst, forcing end of burst.", i->second->GetName().c_str());
|
ServerInstance->SNO->WriteToSnoMask('l',"Server \002%s\002 has not finished burst, forcing end of burst.", i->second->GetName().c_str());
|
||||||
i->second->FinishBurst();
|
i->second->FinishBurst();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ModuleSpanningTree::ConnectServer(Link* x)
|
void ModuleSpanningTree::ConnectServer(Link* x)
|
||||||
{
|
{
|
||||||
|
@ -141,8 +141,6 @@ std::string& TreeServer::GetID()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TreeServer::FinishBurst()
|
void TreeServer::FinishBurst()
|
||||||
{
|
|
||||||
if (!this->bursting)
|
|
||||||
{
|
{
|
||||||
this->bursting = false;
|
this->bursting = false;
|
||||||
ServerInstance->XLines->ApplyLines();
|
ServerInstance->XLines->ApplyLines();
|
||||||
@ -155,7 +153,6 @@ void TreeServer::FinishBurst()
|
|||||||
Event rmode((char*)ServerName.c_str(), (Module*)Utils->Creator, "new_server");
|
Event rmode((char*)ServerName.c_str(), (Module*)Utils->Creator, "new_server");
|
||||||
rmode.Send(ServerInstance);
|
rmode.Send(ServerInstance);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void TreeServer::SetID(const std::string &id)
|
void TreeServer::SetID(const std::string &id)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user