You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
avahi/SOURCES/0001-Do-not-disable-timeout...

29 lines
965 B

From bbf47e831143dc87c90811f404ccbae580930ff0 Mon Sep 17 00:00:00 2001
From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
Date: Sun, 2 Jan 2022 22:29:04 -0300
Subject: [PATCH] Do not disable timeout cleanup on watch cleanup
This was causing timeouts to never be removed from the linked list that
tracks them, resulting in both memory and CPU usage to grow larger over
time.
---
avahi-common/simple-watch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
index 08d8090..2a4a989 100644
--- a/avahi-common/simple-watch.c
+++ b/avahi-common/simple-watch.c
@@ -238,7 +238,7 @@ static void cleanup_watches(AvahiSimplePoll *s, int all) {
destroy_watch(w);
}
- s->timeout_req_cleanup = 0;
+ s->watch_req_cleanup = 0;
}
static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {
--
2.45.2