From 1b1792b1c9a83e2b76c6e51b3a2ef61a15f99897 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 15 Sep 2006 18:46:40 +0000 Subject: Fix crash on two objects trying to free each other at the same time git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5263 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_httpd.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 301e77e16..b44585ba6 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -86,9 +86,12 @@ class HttpSocket : public InspSocket ~HttpSocket() { - if (Timeout) - Instance->Timers->DelTimer(Timeout); - Timeout = NULL; + if (Instance->Time() < Timeout->GetTimer()) + { + if (Timeout) + Instance->Timers->DelTimer(Timeout); + Timeout = NULL; + } } virtual int OnIncomingConnection(int newsock, char* ip) -- cgit v1.2.3