diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2023-04-18 19:12:17 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 21:32:24 +0200 |
commit | a766109d1ec219ba8535a714a8061054eb24500f (patch) | |
tree | 9dc3b9905f142521126c32031c6d6ed72fa6f595 /src | |
parent | e970fb61f2ae92a9b3614468596e5f3904fb90ac (diff) | |
download | ayatana-indicator-messages-a766109d1ec219ba8535a714a8061054eb24500f.tar.gz ayatana-indicator-messages-a766109d1ec219ba8535a714a8061054eb24500f.tar.bz2 ayatana-indicator-messages-a766109d1ec219ba8535a714a8061054eb24500f.zip |
accounts-manager: Cancel account manager requests on new user
There's no point to continue a request if we've already queued another
one.
Diffstat (limited to 'src')
-rw-r--r-- | src/im-accounts-service.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/im-accounts-service.c b/src/im-accounts-service.c index 98e827e..1070e1d 100644 --- a/src/im-accounts-service.c +++ b/src/im-accounts-service.c @@ -104,6 +104,10 @@ user_changed (ActUserManager * manager, ActUser * user, gpointer user_data) /* Clear old proxies */ g_clear_object(&priv->touch_settings); + g_cancellable_cancel(priv->cancel); + g_clear_object(&priv->cancel); + priv->cancel = g_cancellable_new(); + /* Start getting a new proxy */ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, @@ -124,7 +128,10 @@ security_privacy_ready (GObject * obj, GAsyncResult * res, gpointer user_data) GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error); if (error != NULL) { - g_warning("Unable to get a proxy on accounts service for touch settings: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_warning("Unable to get a proxy on accounts service for touch settings: %s", + error->message); + } g_error_free(error); return; } |