mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-13 20:49:02 -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)
|
||||
{
|
||||
/* WARNING: May delete this user! */
|
||||
int thisfd = this->GetFd();
|
||||
|
||||
try
|
||||
{
|
||||
switch (et)
|
||||
{
|
||||
case EVENT_READ:
|
||||
ServerInstance->ProcessUser(this);
|
||||
return;
|
||||
break;
|
||||
case EVENT_WRITE:
|
||||
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 (!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