From c22e0cd7a72a36625121b49eb004f50d4204ab92 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 14 May 2014 21:03:43 +0200 Subject: [PATCH] frontend: Execute commands early on large amounts of incoming traffic. This will free up buffer space if possible. --- src/frontend/connection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/connection.c b/src/frontend/connection.c index dba4310..7cc1ae3 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -434,6 +434,11 @@ connection_read(sdb_conn_t *conn) } n += status; + + /* give the main loop a chance to execute commands (and free up buffer + * space) on large amounts of incoming traffic */ + if (n > 1024 * 1024) + break; } return n; -- 2.30.2