From 921880e00beb052d2c59fbeba75d0a0aaa8888ea Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 10 Feb 2017 15:39:43 +0000 Subject: [PATCH] Add not delete the event if more to write. --- tty.c | 4 ++-- 1 file 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