diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-06 03:12:51 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-06 03:12:51 +0000 |
commit | 75891a676262f7f8c46b1ef33a028df199416904 (patch) | |
tree | 81c6bc25e0703e4638b253ee8c3a1f56c77622fe /src | |
parent | b2073ba0ffc873b669c1f25a2352ad3dfdf13a5c (diff) |
In InspSocket destructor remove any pending timers since the object is now gone. This also fixes bug #202 : m_ident crash.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6514 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspsocket.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 08b8f4cd6..d8d4438fe 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -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) |