From 71ed66226cd352898ccc73b988379dd40cc981b4 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 22 Nov 2017 22:59:19 +0000 Subject: Don't flush when there's nothing to write --- src/misc/skabus-dynteed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc') diff --git a/src/misc/skabus-dynteed.c b/src/misc/skabus-dynteed.c index 8b0e292..7eb69d8 100644 --- a/src/misc/skabus-dynteed.c +++ b/src/misc/skabus-dynteed.c @@ -233,7 +233,7 @@ int main (int argc, char const *const *argv, char const *const *envp) for (unsigned int i = 0 ; i < numconn ; i++) { - if (x[clients[i].xindex].revents & (IOPAUSE_WRITE | IOPAUSE_EXCEPT)) + if (x[clients[i].xindex].events & x[clients[i].xindex].revents & (IOPAUSE_WRITE | IOPAUSE_EXCEPT)) { if (!bufalloc_flush(&clients[i].ba) && !error_isagain(errno)) { -- cgit v1.2.3