summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-06-06 18:01:13 +0100
committerThomas Adam <thomas@xteddy.org>2017-06-06 18:01:13 +0100
commit707798005537e3f01b7937da7abc001a56b5be74 (patch)
treecc9ee3d1ccece290652873d38e86b6f141d9d35c /tty.c
parent78352fdd328b611d935ba051288191b33278cc4a (diff)
parent50b27c8c0dc65cb418ed422e2cdd035a7bafedfe (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 3d0e210b..77291daa 100644
--- a/tty.c
+++ b/tty.c
@@ -159,8 +159,10 @@ tty_read_callback(__unused int fd, __unused short events, void *data)
int nread;
nread = evbuffer_read(tty->in, tty->fd, -1);
- if (nread == -1)
+ if (nread == -1) {
+ event_del(&tty->event_in);
return;
+ }
log_debug("%s: read %d bytes (already %zu)", c->name, nread, size);
while (tty_keys_next(tty))