From d20bda982a9cedfcdfeb677a436ec8a730364650 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 7 Nov 2019 01:36:25 -0500 Subject: Call clientConsume before clientRecv This might reduce the frequency of a client getting its own message back because it was behind in the ring when it sent it. --- bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bounce.c b/bounce.c index 1f29f8c..5f615aa 100644 --- a/bounce.c +++ b/bounce.c @@ -429,8 +429,8 @@ int main(int argc, char *argv[]) { } struct Client *client = event.clients[i]; - if (revents & POLLIN) clientRecv(client); if (revents & POLLOUT) clientConsume(client); + if (revents & POLLIN) clientRecv(client); if (clientError(client) || revents & (POLLHUP | POLLERR)) { clientFree(client); eventRemove(i); -- cgit 1.4.1