aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index b3bf3c74..f1a6167a 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -270,9 +270,10 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
* taking this session and needs to get MSG_READY and stay around.
*/
if (!detached) {
- if (!already_attached)
- server_write_ready(c);
- else if (c->session != NULL)
+ if (!already_attached) {
+ if (~c->flags & CLIENT_CONTROL)
+ proc_send(c->peer, MSG_READY, -1, NULL, 0);
+ } else if (c->session != NULL)
c->last_session = c->session;
c->session = s;
status_timer_start(c);