diff options
author | Thomas Adam <thomas@xteddy.org> | 2014-08-09 20:31:36 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2014-08-09 20:31:36 +0100 |
commit | a131b82e95df990528371b1d9ca40ee2be264fc8 (patch) | |
tree | 156ef097c276e22b60581e3058e2661327240869 /server-client.c | |
parent | fd3b7f357200b85a6f3d6e39bae676c7c70ba082 (diff) | |
parent | 1ac96200a7462597b137719b376f40ad0cd85216 (diff) | |
download | rtmux-a131b82e95df990528371b1d9ca40ee2be264fc8.tar.gz rtmux-a131b82e95df990528371b1d9ca40ee2be264fc8.tar.bz2 rtmux-a131b82e95df990528371b1d9ca40ee2be264fc8.zip |
Merge branch 'obsd-master'
Conflicts:
client.c
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c index e225de30..6d5d0833 100644 --- a/server-client.c +++ b/server-client.c @@ -223,7 +223,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; @@ -656,7 +656,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; /* @@ -884,6 +884,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) |