From 8c93b768e4864be330c3d6a7962892135224f0f4 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 5 Jun 2015 18:01:12 +0000 Subject: Instead of putting dead clients on a list and checking it every loop, use event_once to queue a callback to deal with them. Also dead clients with references would never actually be freed because the wrap-up functions (the callback for stdin, or status_prompt_clear) would never be called. So call them in server_client_lost. --- cmd-load-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-load-buffer.c') diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index 3a26db39..8f653929 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -132,7 +132,7 @@ cmd_load_buffer_callback(struct client *c, int closed, void *data) return; c->stdin_callback = NULL; - c->references--; + server_client_deref(c); if (c->flags & CLIENT_DEAD) return; -- cgit