[gnome-software: 3/4] gs-update-monitor: Ignore G_IO_ERROR_CANCELLED for historical updates
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 3/4] gs-update-monitor: Ignore G_IO_ERROR_CANCELLED for historical updates
- Date: Mon, 28 Mar 2022 13:05:45 +0000 (UTC)
commit 8cbce258c3ed1e581477ce56972c9ce9c6225aa5
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Mar 28 11:32:10 2022 +0100
gs-update-monitor: Ignore G_IO_ERROR_CANCELLED for historical updates
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1693
src/gs-update-monitor.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index a8d3e014c..bf7dbf683 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -1125,6 +1125,12 @@ get_updates_historical_cb (GObject *object, GAsyncResult *res, gpointer data)
/* get result */
apps = gs_plugin_loader_job_process_finish (GS_PLUGIN_LOADER (object), res, &error);
if (apps == NULL) {
+ if (g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_debug ("Failed to get historical updates: %s", error->message);
+ g_clear_error (&monitor->last_offline_error);
+ return;
+ }
/* save this in case the user clicks the
* 'Show Details' button from the notification below */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]