summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp4
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;
}