Skip to content

Commit

Permalink
networkmanager: Close old D-Bus connection
Browse files Browse the repository at this point in the history
initFirewalldDbus() gets called on every unit change, clean up the old
one properly.
  • Loading branch information
martinpitt committed Sep 20, 2023
1 parent 2f1f424 commit c224b30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/networkmanager/firewall-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit c224b30

Please sign in to comment.