Temporarily disable terminate_stuck_sessions() because it is running at unexpected...
authorArt Cancro <ajc@citadel.org>
Thu, 17 Mar 2011 16:48:54 +0000 (12:48 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 15:19:05 +0000 (15:19 +0000)
citadel/context.c

index 1bdea382923e744c2e4f5d233c87f40356dc8573..2a522066aa4cfb5a273fa4016f13ab3919d09910 100644 (file)
@@ -306,8 +306,19 @@ void terminate_idle_sessions(void)
                syslog(LOG_INFO, "Didn't terminate %d protected idle sessions;\n", killed);
 }
 
+
+/*
+ * During shutdown, close the sockets of any sessions still connected.
+ */
 void terminate_stuck_sessions(void)
 {
+
+       return;
+       /* FIXME this function has been disabled because it is somehow being
+        * called at times other than server shutdown, which is throwing all
+        * the users off.  EPIC FAIL!!!
+        */
+
        CitContext *ccptr;
        int killed = 0;
 
@@ -315,14 +326,16 @@ void terminate_stuck_sessions(void)
        for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
                if (ccptr->client_socket != -1)
                {
+                       syslog(LOG_INFO, "terminate_stuck_sessions() is murdering %s", ccptr->curr_user);
                        close(ccptr->client_socket);
                        ccptr->client_socket = -1;
                        killed++;
                }
        }
        end_critical_section(S_SESSION_TABLE);
-       if (killed > 0)
+       if (killed > 0) {
                syslog(LOG_INFO, "Flushed %d stuck sessions\n", killed);
+       }
 }