* move initialization of context to the top
[citadel.git] / citadel / modules / network / serv_network.c
index 9ed349bab54399b19552441ad3dba0db8c985b25..b3d3d4617300430a06a41abc62813c794fa1885a 100644 (file)
@@ -2232,6 +2232,7 @@ void *network_do_queue(void *args) {
         * with a static variable instead.
         */
        if (doing_queue) {
+               CtdlClearSystemContext();
                return NULL;
        }
        doing_queue = 1;
@@ -2319,6 +2320,7 @@ void *network_do_queue(void *args) {
        else {
                CtdlLogPrintf(CTDL_DEBUG, "network: Task STOPPED.\n");
        }
+       CtdlClearSystemContext();
        return NULL;
 }