summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2017-02-10 15:39:43 +0000
committernicm <nicm>2017-02-10 15:39:43 +0000
commit921880e00beb052d2c59fbeba75d0a0aaa8888ea (patch)
treeb83a3dbc32ff190508a5731d278967666ed7a19d /tty.c
parentd22c15107ba3bd019cfbc3e83cd1b12acf258029 (diff)
Add not delete the event if more to write.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 4e7af46e..53f57713 100644
--- a/tty.c
+++ b/tty.c
@@ -182,8 +182,8 @@ tty_write_callback(__unused int fd, __unused short events, void *data)
return;
log_debug("%s: wrote %d bytes (of %zu)", tty->path, nwrite, size);
- if (EVBUFFER_LENGTH(tty->out) == 0)
- event_del(&tty->event_out);
+ if (EVBUFFER_LENGTH(tty->out) != 0)
+ event_add(&tty->event_out, NULL);
}
int