We can not call cleanup() as it uses CtdlIPCQuit which sends a QUIT to
the server that is no longer there and can't respond so it hangs.
If downing the server just do nq_cleanup() instead.
CtdlIPC_chat_send(ipc, "000");
}
fprintf(stderr, "sendcommand: processing ended.\n");
CtdlIPC_chat_send(ipc, "000");
}
fprintf(stderr, "sendcommand: processing ended.\n");
+ if (stricmp(cmd, "DOWN"))
+ cleanup(0);
+ else /* If we downed the server we can't to do CtdlIPCQuit in cleanup()*/
+ nq_cleanup(0);