mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-17 20:40:37 +01:00
libnm: Ignore NoReply errors when NM has vanished from the bus
This fixes the /libnm/client-nm-running test failure when a race condition is hit: test-nm-client:10350): libnm-WARNING **: updated_properties: error reading NMRemoteSettings properties: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) What actually happens is that nm_running_changed_cb() calls GetAll() for a NMRemoteSettings object when NM appears on the bus. If it disappears shortly afterwards, another nm_running_changed_cb() is called which suppresses further object updates, but the original GetAll() might not have finished yet and DBus will generate a NoReply() response for it. We ought to ignore it.
This commit is contained in:
parent
b54030de22
commit
4496b69e47
1 changed files with 6 additions and 0 deletions
|
|
@ -1632,11 +1632,17 @@ _nm_object_reload_properties_async (NMObject *object, GAsyncReadyCallback callba
|
|||
gboolean
|
||||
_nm_object_reload_properties_finish (NMObject *object, GAsyncResult *result, GError **error)
|
||||
{
|
||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
||||
GSimpleAsyncResult *simple;
|
||||
|
||||
g_return_val_if_fail (NM_IS_OBJECT (object), FALSE);
|
||||
g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (object), _nm_object_reload_properties_async), FALSE);
|
||||
|
||||
/* NM might have disappeared meanwhile. That would cause a NoReply error to be emitted,
|
||||
* but we don't care if property updates were disabled. */
|
||||
if (priv->suppress_property_updates)
|
||||
return TRUE;
|
||||
|
||||
simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
if (g_simple_async_result_propagate_error (simple, error))
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue