summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-15 18:46:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-15 18:46:40 +0000
commit1b1792b1c9a83e2b76c6e51b3a2ef61a15f99897 (patch)
tree33353d44206b7db7efde840092ad49001057283d
parent496f40165de330eed3dc344c1223e182ae5f6419 (diff)
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
-rw-r--r--src/modules/m_httpd.cpp9
1 files 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)