Commit 76bc1dd9 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

libstatus-notifier: handle cancellation correctly

parent 3b9fd418
......@@ -171,18 +171,25 @@ proxy_ready_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
SnDBusItemServerV0 *server;
GError *error;
SnWatcherV0Gen *watcher;
SnDBusItemServerV0 *server;
server = SN_DBUS_ITEM_SERVER_V0 (user_data);
error = NULL;
watcher = sn_watcher_v0_gen_proxy_new_finish (res, &error);
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
{
g_error_free (error);
return;
}
server->watcher = sn_watcher_v0_gen_proxy_new_finish (res, &error);
server = SN_DBUS_ITEM_SERVER_V0 (user_data);
server->watcher = watcher;
if (error)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
sn_dbus_item_emit_error (SN_DBUS_ITEM (server), error);
sn_dbus_item_emit_error (SN_DBUS_ITEM (server), error);
g_error_free (error);
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment