From: Sebastian Harl Date: Wed, 14 May 2014 19:03:43 +0000 (+0200) Subject: frontend: Execute commands early on large amounts of incoming traffic. X-Git-Tag: sysdb-0.1.0~22 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=c22e0cd7a72a36625121b49eb004f50d4204ab92 frontend: Execute commands early on large amounts of incoming traffic. This will free up buffer space if possible. --- 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;