mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-19 15:39:01 -04:00
Fix loop when quitting multiple users (this is probably whats eating cpu)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6084 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
f85fdf431e
commit
f2dfc4be59
@ -1996,13 +1996,14 @@ void userrec::ShowRULES()
|
|||||||
void userrec::HandleEvent(EventType et, int errornum)
|
void userrec::HandleEvent(EventType et, int errornum)
|
||||||
{
|
{
|
||||||
/* WARNING: May delete this user! */
|
/* WARNING: May delete this user! */
|
||||||
|
int thisfd = this->GetFd();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch (et)
|
switch (et)
|
||||||
{
|
{
|
||||||
case EVENT_READ:
|
case EVENT_READ:
|
||||||
ServerInstance->ProcessUser(this);
|
ServerInstance->ProcessUser(this);
|
||||||
return;
|
|
||||||
break;
|
break;
|
||||||
case EVENT_WRITE:
|
case EVENT_WRITE:
|
||||||
this->FlushWriteBuf();
|
this->FlushWriteBuf();
|
||||||
@ -2019,9 +2020,12 @@ void userrec::HandleEvent(EventType et, int errornum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If the user has raised an error whilst being processed, quit them now we're safe to */
|
/* If the user has raised an error whilst being processed, quit them now we're safe to */
|
||||||
if (!WriteError.empty())
|
if ((ServerInstance->SE->GetRef(thisfd) == this))
|
||||||
{
|
{
|
||||||
userrec::QuitUser(ServerInstance, this, GetWriteError());
|
if (!WriteError.empty())
|
||||||
|
{
|
||||||
|
userrec::QuitUser(ServerInstance, this, GetWriteError());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user