summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 8822f69f8..ea09a8b1d 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -134,6 +134,7 @@ void StreamSocket::Close()
ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "%s threw an exception: %s",
modexcept.GetSource().c_str(), modexcept.GetReason().c_str());
}
+ delete iohook;
DelIOHook();
}
ServerInstance->SE->Shutdown(this, 2);
@@ -467,9 +468,7 @@ void BufferedSocket::DoWrite()
{
state = I_CONNECTED;
this->OnConnected();
- if (GetIOHook())
- GetIOHook()->OnStreamSocketConnect(this);
- else
+ if (!GetIOHook())
ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE);
}
this->StreamSocket::DoWrite();