diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:30:14 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-07 13:30:14 +0200 |
commit | 30fec322809582f91be70cc1bb16c9678180db76 (patch) | |
tree | 464446f79af6259b4e280514eac25bea7777b014 /src/listensocket.cpp | |
parent | 4d7c590bb6a937c4c412241ae67b9fc74083b365 (diff) |
Relax fd bounds checking
We can cope with fds greater than SocketEngine::GetMaxFds() since 3752b3f59d5216d7dc6221a361efc76b9ad2273d
Diffstat (limited to 'src/listensocket.cpp')
-rw-r--r-- | src/listensocket.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp index e73a8f4ce..cb4bfd2db 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -125,25 +125,6 @@ void ListenSocket::AcceptInternal() irc::sockets::aptosa(bind_addr, bind_port, server); } - /* - * XXX - - * this is done as a safety check to keep the file descriptors within range of fd_ref_table. - * its a pretty big but for the moment valid assumption: - * file descriptors are handed out starting at 0, and are recycled as theyre freed. - * therefore if there is ever an fd over 65535, 65536 clients must be connected to the - * irc server at once (or the irc server otherwise initiating this many connections, files etc) - * which for the time being is a physical impossibility (even the largest networks dont have more - * than about 10,000 users on ONE server!) - */ - if (incomingSockfd >= SocketEngine::GetMaxFds()) - { - ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Server is full"); - SocketEngine::Shutdown(incomingSockfd, 2); - SocketEngine::Close(incomingSockfd); - ServerInstance->stats->statsRefused++; - return; - } - if (client.sa.sa_family == AF_INET6) { /* |