]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/sysdep.c
CtdlForEachMessage() don't process message 0
[citadel.git] / citadel / server / sysdep.c
index cbe62879a06dfd278336acacbd60d22f3ce3aa68..772308e448e539df575f73cdff9b1a33814c8707 100644 (file)
@@ -825,8 +825,8 @@ do_select:  force_purge = 0;
                }
                end_critical_section(S_SESSION_TABLE);
 
-               if (bind_me) {
-                       goto SKIP_SELECT;
+               if (bind_me) {                  // don't search for a session to bind to.
+                       goto SKIP_SELECT;       // we already found one.
                }
 
                // If we got this far, it means that there are no sessions
@@ -990,13 +990,7 @@ SKIP_SELECT:
        }
 
        // If control reaches this point, the server is shutting down
-       while(1) {
-               sleep(1);               // wait to die
-       }
-       //pthread_mutex_lock(&ThreadCountMutex);
-       //--num_workers;
-       //pthread_mutex_unlock(&ThreadCountMutex);
-       //return(NULL);
+       return(NULL);
 }