]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socketengine_epoll.cpp
Move all_opers into class InspIRCd
[user/henk/code/inspircd.git] / src / socketengine_epoll.cpp
index d1a761d5b4f17d561a71083ce7ee9ed6683e424d..05513290b6a1046d1454b52205d85779a09d2d90 100644 (file)
@@ -33,7 +33,7 @@ EPollEngine::EPollEngine()
                log(SPARSE,"ERROR: this is a fatal error, exiting now.");
                printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
                printf("ERROR: this is a fatal error, exiting now.");
-               Exit(0);
+               InspIRCd::Exit(ERROR);
        }
        CurrentSetSize = 0;
 }
@@ -55,7 +55,11 @@ bool EPollEngine::AddFd(int fd, bool readable, char type)
                log(DEFAULT,"ERROR: System out of file descriptors!");
                return false;
        }
+       if (ref[fd])
+               return false;
+
        ref[fd] = type;
+
        if (readable)
        {
                log(DEBUG,"Set readbit");