ECalBackendHttp: Ignore cancellations when retrieving data.
authorMatthew Barnes <mbarnes@redhat.com>
Mon, 25 Feb 2013 14:34:24 +0000 (09:34 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Mon, 25 Feb 2013 14:36:45 +0000 (09:36 -0500)
Helps avoid emitting uninteresting error messages to clients.

calendar/backends/http/e-cal-backend-http.c

index 0f7a16e..f00fbbf 100644 (file)
@@ -784,7 +784,11 @@ begin_retrieval_cb (GIOSchedulerJob *job,
 
        backend->priv->is_loading = FALSE;
 
-       if (error != NULL) {
+       /* Ignore cancellations. */
+       if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+               g_error_free (error);
+
+       } else if (error != NULL) {
                e_cal_backend_notify_error (
                        E_CAL_BACKEND (backend),
                        error->message);