mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
core: fix file descriptor leak in bus manager
There's a bug [1] in GLib for which a GDBusConnection is marked as closed when the remote peer vanishes but its resources are not cleaned up. Work around the issue by explicitly closing the connection when remote_peer_vanished is TRUE. [1] https://bugzilla.gnome.org/show_bug.cgi?id=754730 https://bugzilla.redhat.com/show_bug.cgi?id=1260920
This commit is contained in:
parent
998ab88949
commit
8318672fe9
1 changed files with 7 additions and 0 deletions
|
|
@ -131,6 +131,13 @@ private_server_closed (GDBusConnection *conn,
|
|||
s->detail,
|
||||
conn);
|
||||
|
||||
/* FIXME: there's a bug (754730) in GLib for which the connection
|
||||
* is marked as closed when the remote peer vanishes but its
|
||||
* resources are not cleaned up. Work around it by explicitly
|
||||
* closing the connection in that case. */
|
||||
if (remote_peer_vanished)
|
||||
g_dbus_connection_close (conn, NULL, NULL, NULL);
|
||||
|
||||
g_hash_table_remove (s->connections, conn);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue