summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-07-08 22:19:13 -0400
committerAdam <Adam@anope.org>2010-07-08 22:19:13 -0400
commit1cf4ebb231f2f7770b717a5e176d7bb5cbc66284 (patch)
tree16094a36484e2764c5f541c4324e1d2a6300f61b /src/main.cpp
parent8f8b1e46d670f45bafdc5c888bec3f005cc06c1f (diff)
Added an epoll socket engine
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7634a0e15..dccfcc15f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -109,16 +109,18 @@ class UpdateTimer : public Timer
Socket *UplinkSock = NULL;
-class UplinkSocket : public Socket
+class UplinkSocket : public ClientSocket
{
public:
- UplinkSocket(const std::string &nTargetHost, int nPort, const std::string &nBindHost = "", bool nIPv6 = false) : Socket(nTargetHost, nPort, nBindHost, nIPv6)
+ UplinkSocket(const std::string &nTargetHost, int nPort, const std::string &nBindHost = "", bool nIPv6 = false) : ClientSocket(nTargetHost, nPort, nBindHost, nIPv6)
{
UplinkSock = this;
}
~UplinkSocket()
{
+ /* Process the last bits of data before disconnecting */
+ SocketEngine->Process();
UplinkSock = NULL;
}
@@ -189,8 +191,6 @@ void do_restart_services()
UserListByUID.erase(it->second->GetUID().c_str());
}
ircdproto->SendSquit(Config.ServerName, quitmsg);
- /* Process to send the last bits of information before disconnecting */
- socketEngine.Process();
delete UplinkSock;
close_log();
/* First don't unload protocol module, then do so */
@@ -239,8 +239,6 @@ static void services_shutdown()
while (!UserListByNick.empty())
delete UserListByNick.begin()->second;
}
- /* Process to send the last bits of information before disconnecting */
- socketEngine.Process();
delete UplinkSock;
FOREACH_MOD(I_OnShutdown, OnShutdown());
/* First don't unload protocol module, then do so */
@@ -538,7 +536,7 @@ int main(int ac, char **av, char **envp)
ModeManager::ProcessModes();
/* Process the socket engine */
- socketEngine.Process();
+ SocketEngine->Process();
}
if (quitting)