diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 09:32:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 09:32:57 +0000 |
commit | 2329d59b09cdc05b0b403f7d313df65492e1813b (patch) | |
tree | 6d5f005565b62883e09ed2b2e09752fc034da413 /src/users.cpp | |
parent | 3794888ebf1fb19f404c22ff2d5333ccc6c3129e (diff) |
Extra checking that the fd's we pass to SocketEngine::AddFd were added (a lot of assuming was going off, leading to total chaos if we run out of fd's etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4780 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index c02dbd4ab..34c347cb9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -908,10 +908,13 @@ void AddClient(int socket, int port, bool iscached, insp_inaddr ip) if (socket > -1) { - ServerInstance->SE->AddFd(socket,true,X_ESTAB_CLIENT); + if (!ServerInstance->SE->AddFd(socket,true,X_ESTAB_CLIENT)) + { + kill_link(_new, "Internal error handling connection"); + return; + } } - log(DEBUG,"Writing to client %d",_new->fd); WriteServ(_new->fd,"NOTICE Auth :*** Looking up your hostname..."); } |