From ea54db47ad2da9778d7d16737fd68a1929ed907e Mon Sep 17 00:00:00 2001 From: Dave West Date: Sat, 3 Nov 2007 22:57:56 +0000 Subject: [PATCH] Fix thirty second delay in sendcommand when downing the server. 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. --- citadel/sendcommand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/citadel/sendcommand.c b/citadel/sendcommand.c index f0da309c7..382e20927 100644 --- a/citadel/sendcommand.c +++ b/citadel/sendcommand.c @@ -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; } -- 2.39.2