]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Split IOHook into IOHook and IOHookProvider
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index 8822f69f82f5538e3aa2f2579a628bfe464538ee..ea09a8b1d5ca2c6fa819acdf978996770a26f3a3 100644 (file)
@@ -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();