From 455284f1c02af1a4e0d68555e285563ce7fffb8f Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 3 Nov 2015 15:07:36 +0000 Subject: [PATCH] Detach the client we are looping over, from Thomas Adam. --- cmd-attach-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd-attach-session.c b/cmd-attach-session.c index e5589277..cb1f589e 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -139,7 +139,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag, TAILQ_FOREACH(c_loop, &clients, entry) { if (c_loop->session != s || c == c_loop) continue; - proc_send_s(c->peer, MSG_DETACH, s->name); + proc_send_s(c_loop->peer, MSG_DETACH, s->name); } }