summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-10 19:49:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-10 19:49:49 +0000
commit20d467e5a5473577c0e04b63edecdbbbef7ec9c2 (patch)
tree5651444dcea72f4d8b4df8238d8ce33d4f325775
parentc99ac63b9a83f722bc9604caf2882af8f7af8532 (diff)
Correctly handle write events
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5920 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/userprocess.cpp6
-rw-r--r--src/users.cpp8
2 files changed, 4 insertions, 10 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index b738c8096..43edb56b1 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -333,13 +333,7 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
*/
curr->FlushWriteBuf();
- if (*curr->GetWriteError())
- {
- GlobalGoners.AddItem(curr,curr->GetWriteError());
- continue;
- }
}
-
}
/* If theres nothing to do, trigger in the next second, something might come up */
diff --git a/src/users.cpp b/src/users.cpp
index 0d6b0d990..b568bac63 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -673,7 +673,10 @@ void userrec::FlushWriteBuf()
this->ServerInstance->SE->WantWrite(this);
}
else
- this->SetWriteError(strerror(errno));
+ {
+ this->QuitUser(ServerInstance, this, strerror(errno));
+ return;
+ }
}
else
{
@@ -786,9 +789,6 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui
user->WriteCommonExcept("QUIT :%s",reason.c_str());
}
- if (IS_LOCAL(user))
- user->FlushWriteBuf();
-
FOREACH_MOD_I(Instance,I_OnUserDisconnect,OnUserDisconnect(user));
if (IS_LOCAL(user))