]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
In InspSocket destructor remove any pending timers since the object is now gone....
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 6 Feb 2007 03:12:51 +0000 (03:12 +0000)
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 6 Feb 2007 03:12:51 +0000 (03:12 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6514 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspsocket.cpp

index 08b8f4cd698c2fa907b9d0f41494fd059c9210ff..d8d4438fe9a6e8f9ba092622022759cca8e3bc48 100644 (file)
@@ -241,7 +241,7 @@ void InspSocket::Close()
        int save = errno;
        if (this->fd > -1)
        {
-                if (this->IsIOHooked && Instance->Config->GetIOHook(this))
+               if (this->IsIOHooked && Instance->Config->GetIOHook(this))
                {
                        try
                        {
@@ -551,6 +551,11 @@ void InspSocket::OnClose() { return; }
 InspSocket::~InspSocket()
 {
        this->Close();
+       if (Timeout)
+       {
+               Instance->Timers->DelTimer(Timeout);
+               Timeout = NULL;
+       }
 }
 
 void InspSocket::HandleEvent(EventType et, int errornum)