From 810c662c9b55908101ca085293c52c3239ef22d1 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 26 Sep 2009 14:12:45 +0000 Subject: Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11762 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 6348d7982..004d679ed 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -97,7 +97,7 @@ BufferedSocketError BufferedSocket::BeginConnect(const irc::sockets::sockaddrs& this->state = I_CONNECTING; - if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_READ | FD_WANT_POLL_WRITE)) + if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_READ | FD_WANT_SINGLE_WRITE)) return I_ERR_NOMOREFDS; this->Timeout = new SocketTimeout(this->GetFd(), this, timeout, ServerInstance->Time()); @@ -414,6 +414,8 @@ void BufferedSocket::DoWrite() this->OnConnected(); if (GetIOHook()) GetIOHook()->OnStreamSocketConnect(this); + else + ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE); } this->StreamSocket::DoWrite(); } -- cgit v1.2.3