summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-24 12:14:38 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-24 12:14:38 +0200
commit0ca92e252e5a22f3378f1a6d621fee878fcbf09d (patch)
tree3e5bb97c26194f429254a530bd6183d375c800a8 /src
parent567142ef7a82175f3141af255bbe70eae22983cc (diff)
Add socket into the SocketEngine as soon as possible in UserManager::AddUser()
Diffstat (limited to 'src')
-rw-r--r--src/usermanager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 5891b42f0..71ccd09da 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -88,6 +88,13 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
this->local_users.push_front(New);
+ if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
+ {
+ ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection");
+ this->QuitUser(New, "Internal error handling connection");
+ return;
+ }
+
if (this->local_users.size() > ServerInstance->Config->SoftLimit)
{
ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit);
@@ -147,13 +154,6 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
}
}
- if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
- {
- ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection");
- this->QuitUser(New, "Internal error handling connection");
- return;
- }
-
if (ServerInstance->Config->RawLog)
New->WriteNotice("*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.");