diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-04-05 14:11:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-04-05 14:11:06 +0000 |
commit | ba5e14a443808852f594fd4f90723b08bda35b03 (patch) | |
tree | 7fdf3fdf5de207c0871439c978397dc035961caf /usr.bin/tmux | |
parent | 27091bc54d6063f455c770d03f82b308c9a7a015 (diff) |
Move client-detached into server_client_lost so it is fired even if a
client is closed unexpectedly.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server-client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index cdfc95c3775..0fc392008da 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.370 2021/02/17 07:18:36 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.371 2021/04/05 14:11:05 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -299,6 +299,9 @@ server_client_lost(struct client *c) TAILQ_REMOVE(&clients, c, entry); log_debug("lost client %p", c); + if (c->flags & CLIENT_ATTACHED) + notify_client("client-detached", c); + if (c->flags & CLIENT_CONTROL) control_stop(c); if (c->flags & CLIENT_TERMINAL) @@ -1769,9 +1772,6 @@ server_client_check_exit(struct client *c) if (EVBUFFER_LENGTH(cf->buffer) != 0) return; } - - if (c->flags & CLIENT_ATTACHED) - notify_client("client-detached", c); c->flags |= CLIENT_EXITED; switch (c->exit_type) { |