]> code.citadel.org Git - citadel.git/blobdiff - citadel/sendcommand.c
Fix thirty second delay in sendcommand when downing the server.
[citadel.git] / citadel / sendcommand.c
index f0da309c76a9f296c294eb1413a40091e1dbfd83..382e2092760ee2dc1a22b438fc90cad65a068599 100644 (file)
@@ -247,6 +247,9 @@ int main(int argc, char **argv)
                CtdlIPC_chat_send(ipc, "000");
        }
        fprintf(stderr, "sendcommand: processing ended.\n");
-       cleanup(0);
+       if (stricmp(cmd, "DOWN"))
+               cleanup(0);
+       else    /* If we downed the server we can't to do CtdlIPCQuit in cleanup()*/
+               nq_cleanup(0);
        return 0;
 }