mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 17:30:35 +01:00
team: fix startup of team by ignoring teamd_dbus_vanished at first
g_bus_watch_name immediatly emits a vanished signal, if the name does not exist at the begining. So the first signal, does not indicate an actual change of state and must be ignored. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
23e90ee76d
commit
154dcd948a
1 changed files with 12 additions and 0 deletions
|
|
@ -320,6 +320,18 @@ teamd_dbus_vanished (GDBusConnection *connection,
|
|||
|
||||
g_return_if_fail (priv->teamd_dbus_watch);
|
||||
|
||||
if (priv->teamd_timeout) {
|
||||
/* g_bus_watch_name will always raise an initial signal, to indicate whether the
|
||||
* name exists/not exists initially. Do not take this as a failure, until the
|
||||
* startup timeout is over.
|
||||
*
|
||||
* Note that g_bus_watch_name is guaranteed to alternate vanished/appeared signals,
|
||||
* so we won't hit this condition again (because the next signal is either 'appeared'
|
||||
* or 'timeout'). */
|
||||
nm_log_dbg (LOGD_TEAM, "(%s): teamd vanished from D-Bus (ignored)", nm_device_get_iface (dev));
|
||||
return;
|
||||
}
|
||||
|
||||
nm_log_info (LOGD_TEAM, "(%s): teamd vanished from D-Bus", nm_device_get_iface (dev));
|
||||
teamd_cleanup (dev);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue