From c224b30432fe58dbd4ac2a29bbcfb8adaaec6959 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 19 Sep 2023 12:49:59 +0200 Subject: [PATCH] networkmanager: Close old D-Bus connection initFirewalldDbus() gets called on every unit change, clean up the old one properly. --- pkg/networkmanager/firewall-client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/networkmanager/firewall-client.js b/pkg/networkmanager/firewall-client.js index 054ee512955..b1483bf740e 100644 --- a/pkg/networkmanager/firewall-client.js +++ b/pkg/networkmanager/firewall-client.js @@ -75,6 +75,9 @@ firewall.debouncedGetServices = debounce(300, () => { function initFirewalldDbus() { debug("initializing D-Bus connection"); + if (firewalld_dbus) + firewalld_dbus.close(); + firewalld_dbus = cockpit.dbus('org.fedoraproject.FirewallD1', { superuser: "try" }); firewalld_dbus.addEventListener('owner', (event, owner) => {