[gnome-software/1487-cancel-ongoing-update-downloads-when-system-power-is-low] gs-update-monitor: Use 'refresh_cancellable' for updates' download



commit 3aaf5925cd7079c74a559c285e605a3c94a4708d
Author: Milan Crha <mcrha redhat com>
Date:   Fri Mar 4 11:51:02 2022 +0100

    gs-update-monitor: Use 'refresh_cancellable' for updates' download
    
    This way the download is cancelled when the network connection changes
    to the metered mode.

 src/gs-update-monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 2780f9ac6..5616d1110 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -569,7 +569,7 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
                g_debug ("Getting updates");
                gs_plugin_loader_job_process_async (monitor->plugin_loader,
                                                    plugin_job,
-                                                   monitor->cancellable,
+                                                   monitor->refresh_cancellable,
                                                    download_finished_cb,
                                                    monitor);
        } else {
@@ -605,7 +605,7 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
                        g_debug ("Getting %u online updates", gs_app_list_length (update_online));
                        gs_plugin_loader_job_process_async (monitor->plugin_loader,
                                                            plugin_job,
-                                                           monitor->cancellable,
+                                                           monitor->refresh_cancellable,
                                                            download_finished_cb,
                                                            monitor);
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]