From f117c7d94a2abb0561540a1fe33dd729b1cb8b34 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 13 Jul 2014 20:23:10 +0000 Subject: If a client is killed while suspended with ^Z so has gone through the MSG_EXITED dance, don't try to resume it since a) it's pointless and b) the tty structures have been cleaned up and tmux will crash. --- server-client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 0f4d39d6..1ef3f311 100644 --- a/server-client.c +++ b/server-client.c @@ -875,6 +875,9 @@ server_client_msg_dispatch(struct client *c) break; c->flags &= ~CLIENT_SUSPENDED; + if (c->tty.fd == -1) /* exited in the meantime */ + break; + if (gettimeofday(&c->activity_time, NULL) != 0) fatal("gettimeofday"); if (c->session != NULL) -- cgit From 2b67907176805e3df5bd913174617d768277bfff Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 13 Jul 2014 20:51:08 +0000 Subject: An EOF is a good reason to close a connection. ok nicm@ --- server-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 1ef3f311..5616115c 100644 --- a/server-client.c +++ b/server-client.c @@ -224,7 +224,7 @@ server_client_callback(int fd, short events, void *data) return; if (fd == c->ibuf.fd) { - if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) < 0 && + if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) <= 0 && errno != EAGAIN) goto client_lost; -- cgit From 1ac96200a7462597b137719b376f40ad0cd85216 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 9 Aug 2014 07:33:37 +0000 Subject: Remove support for the continuous reporting "any" mouse mode which never really worked properly and is rarely used. --- server-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 5616115c..4c58170f 100644 --- a/server-client.c +++ b/server-client.c @@ -647,7 +647,7 @@ server_client_reset_state(struct client *c) */ mode = s->mode; if ((c->tty.mouse.flags & MOUSE_RESIZE_PANE) && - !(mode & (MODE_MOUSE_BUTTON|MODE_MOUSE_ANY))) + !(mode & MODE_MOUSE_BUTTON)) mode |= MODE_MOUSE_BUTTON; /* -- cgit