aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar danieldg2009-09-27 00:22:29 +0000
committerGravatar danieldg2009-09-27 00:22:29 +0000
commit934d9a6a184b7a8600fcda30e012ba6f29f17b64 (patch)
tree44edb8dc4551777fcbdb73ef1a28e9b9d44bd9a6 /src/users.cpp
parentCompile fixes and message updates (diff)
SendQ bugfixes
Fix DoWrite running on errored sockets Add testnet module for sendq and shutdown testing Prevent DoWrite from trying to write when writes are blocking git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11768 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 1f38dfada..fb36ac324 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -575,13 +575,12 @@ void User::AddWriteBuf(const std::string &data)
if (!quitting && MyClass && getSendQSize() + data.length() > MyClass->GetSendqHardMax() && !HasPrivPermission("users/flood/increased-buffers"))
{
/*
- * Fix by brain - Set the error text BEFORE calling, because
- * if we dont it'll recursively call here over and over again trying
- * to repeatedly add the text to the sendq!
+ * Quit the user FIRST, because otherwise we could recurse
+ * here and hit the same limit.
*/
ServerInstance->Users->QuitUser(this, "SendQ exceeded");
- ServerInstance->SNO->WriteToSnoMask('a', "User %s SendQ of %lu exceeds connect class maximum of %lu",
- nick.c_str(), (unsigned long)getSendQSize() + data.length(), MyClass->GetSendqHardMax());
+ ServerInstance->SNO->WriteToSnoMask('a', "User %s SendQ exceeds connect class maximum of %lu",
+ nick.c_str(), MyClass->GetSendqHardMax());
return;
}