diff options
| author | 2014-01-30 21:44:51 +0100 | |
|---|---|---|
| committer | 2014-01-30 21:44:51 +0100 | |
| commit | 5ac1ffce1168c4e3409e6667ff30285bfbc82bde (patch) | |
| tree | 09b4ab975d5bfd221aa1341d722524b97764fe4f /src/inspsocket.cpp | |
| parent | m_spanningtree Rewrite /map (diff) | |
Allow Timers to delete themselves in Tick()
Diffstat (limited to 'src/inspsocket.cpp')
| -rw-r--r-- | src/inspsocket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 798cde9b0..46f5bd3b2 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -440,7 +440,10 @@ bool SocketTimeout::Tick(time_t) ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "SocketTimeout::Tick"); if (ServerInstance->SE->GetRef(this->sfd) != this->sock) + { + delete this; return false; + } if (this->sock->state == I_CONNECTING) { @@ -456,6 +459,7 @@ bool SocketTimeout::Tick(time_t) } this->sock->Timeout = NULL; + delete this; return false; } |
