Detach the client we are looping over, from Thomas Adam.

This commit is contained in:
nicm 2015-11-03 15:07:36 +00:00
parent ba7fb49fb9
commit 455284f1c0

View File

@ -139,7 +139,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
TAILQ_FOREACH(c_loop, &clients, entry) { TAILQ_FOREACH(c_loop, &clients, entry) {
if (c_loop->session != s || c == c_loop) if (c_loop->session != s || c == c_loop)
continue; continue;
proc_send_s(c->peer, MSG_DETACH, s->name); proc_send_s(c_loop->peer, MSG_DETACH, s->name);
} }
} }