From b7939eb26693a462672d96ff2ce0659866d569ed Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 10 Feb 2026 08:30:21 +0000 Subject: [PATCH] Don't call event_add again if the event is already pending, from Conor Taylor in GitHub issue 4848. --- tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tty.c b/tty.c index 6e413572..5325f38c 100644 --- a/tty.c +++ b/tty.c @@ -628,7 +628,8 @@ tty_add(struct tty *tty, const char *buf, size_t len) if (tty_log_fd != -1) write(tty_log_fd, buf, len); - if (tty->flags & TTY_STARTED) + if ((tty->flags & TTY_STARTED) && + !event_pending(&tty->event_out, EV_WRITE, NULL)) event_add(&tty->event_out, NULL); }