From 2329d59b09cdc05b0b403f7d313df65492e1813b Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 8 Aug 2006 09:32:57 +0000 Subject: 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 --- src/users.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') 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..."); } -- cgit v1.2.3