projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
309fe9e
)
Fix thirty second delay in sendcommand when downing the server.
author
Dave West
<davew@uncensored.citadel.org>
Sat, 3 Nov 2007 22:57:56 +0000
(22:57 +0000)
committer
Dave West
<davew@uncensored.citadel.org>
Sat, 3 Nov 2007 22:57:56 +0000
(22:57 +0000)
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
patch
|
blob
|
history
diff --git
a/citadel/sendcommand.c
b/citadel/sendcommand.c
index f0da309c76a9f296c294eb1413a40091e1dbfd83..382e2092760ee2dc1a22b438fc90cad65a068599 100644
(file)
--- 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;
}