]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Constant eating 20% cpu since last nights commit - test fix
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 6b7f8b07307c3cbc697b4a6c548bb1d82a40e316..98418a967c7fd81c012c41fc3b506a6d2876da14 100644 (file)
@@ -606,7 +606,7 @@ bool InspIRCd::LoadModule(const char* filename)
 
 void InspIRCd::DoOneIteration(bool process_module_sockets)
 {
-        bool expire_run = false;
+        /*bool expire_run = false;
         int activefds[MAX_DESCRIPTORS];
         int incomingSockfd;
         int in_port;
@@ -615,7 +615,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
         InspSocket* s_del = NULL;
         unsigned int numberactive;
         sockaddr_in sock_us;     // our port number
-        socklen_t uslen;         // length of our port number
+        socklen_t uslen;*/         // length of our port number
 
         /* time() seems to be a pretty expensive syscall, so avoid calling it too much.
          * Once per loop iteration is pleanty.
@@ -654,7 +654,8 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
          * most, 20 or so, so this won't be much of a performance
          * hit at all.   
          */ 
-        DoSocketTimeouts(TIME);  
+       if (process_module_sockets)
+               DoSocketTimeouts(TIME);  
          
         TickTimers(TIME);
          
@@ -802,6 +803,8 @@ int InspIRCd::Run()
        WritePID(Config->PID);
 
        /* main loop, this never returns */
+       expire_run = false;
+
        while (true)
        {
                DoOneIteration(true);