Skip to content

Commit 9bcf961

Browse files
committed
Adjust event loop limit
There was a FIXME that backed the limit down to 3 because plugins couldn't keep up. The lockless queue and libauplugin should fix that. Revise the loop limit to cover a whole file watch event.
1 parent 2244509 commit 9bcf961

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/auditd.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,12 @@ static void netlink_handler(struct ev_loop *loop, struct ev_io *io,
593593
{
594594
int rc = 1, cnt = 0;
595595

596-
// Try to get all the events that are waiting but yield after 5 to
597-
// let other handlers run. Five should cover PATH events.
598-
// FIXME: backing down to 3 until IPC is faster
599-
while (rc > 0 && cnt < 3) {
596+
// Try to get all the events that are waiting but yield after 4 to
597+
// let other handlers run. Four should cover file watch events.
598+
while (rc > 0 && cnt < 4) {
600599
if (cur_event == NULL) {
601600
cur_event = alloc_pool_event();
602-
if (cur_event == NULL) {
601+
if (cur_event == NULL) {
603602
char emsg[DEFAULT_BUF_SZ];
604603
if (*subj)
605604
snprintf(emsg, sizeof(emsg),

0 commit comments

Comments
 (0)