team: do not g_source_remove after g_child_watch_add signal was emitted
g_child_watch_add only emits one signal and gets automatically removed from the source. No need for double removal, so unset teamd_process_watch before calling teamd_cleanup. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
@@ -347,7 +347,10 @@ teamd_process_watch_cb (GPid pid, gint status, gpointer user_data)
|
|||||||
NMDevice *dev = NM_DEVICE (user_data);
|
NMDevice *dev = NM_DEVICE (user_data);
|
||||||
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (dev);
|
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (dev);
|
||||||
|
|
||||||
|
g_return_if_fail (priv->teamd_process_watch);
|
||||||
|
|
||||||
nm_log_info (LOGD_TEAM, "(%s): teamd died", nm_device_get_iface (dev));
|
nm_log_info (LOGD_TEAM, "(%s): teamd died", nm_device_get_iface (dev));
|
||||||
|
priv->teamd_process_watch = 0;
|
||||||
priv->teamd_pid = 0;
|
priv->teamd_pid = 0;
|
||||||
teamd_cleanup (dev, TRUE);
|
teamd_cleanup (dev, TRUE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user