]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/threadengines/threadengine_pthread.cpp
Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*)
[user/henk/code/inspircd.git] / src / threadengines / threadengine_pthread.cpp
index ebd11d487cbf83f042fdb4e92a773eaaf76fc8f8..8527907c491ca249dc40693e7e371ee5ac912e10 100644 (file)
@@ -75,13 +75,12 @@ class ThreadSignalSocket : public EventHandler
        ThreadSignalSocket(SocketThread* p, int newfd) : parent(p)
        {
                SetFd(newfd);
-               ServerInstance->SE->AddFd(this, FD_WANT_FAST_READ | FD_WANT_NO_WRITE);
+               SocketEngine::AddFd(this, FD_WANT_FAST_READ | FD_WANT_NO_WRITE);
        }
 
        ~ThreadSignalSocket()
        {
-               ServerInstance->SE->DelFd(this);
-               SocketEngine::Close(GetFd());
+               SocketEngine::Close(this);
        }
 
        void Notify()
@@ -124,14 +123,13 @@ class ThreadSignalSocket : public EventHandler
        {
                SetFd(recvfd);
                SocketEngine::NonBlocking(fd);
-               ServerInstance->SE->AddFd(this, FD_WANT_FAST_READ | FD_WANT_NO_WRITE);
+               SocketEngine::AddFd(this, FD_WANT_FAST_READ | FD_WANT_NO_WRITE);
        }
 
        ~ThreadSignalSocket()
        {
                close(send_fd);
-               ServerInstance->SE->DelFd(this);
-               SocketEngine::Close(GetFd());
+               SocketEngine::Close(this);
        }
 
        void Notify()