return http;
}
+/**
+ * grits_http_abort:
+ * @http: the #GritsHttp to abort
+ *
+ * Cancels any pending requests and prevents new requests.
+ */
+void grits_http_abort(GritsHttp *http)
+{
+ g_debug("GritsHttp: abort - %s", http->prefix);
+ http->aborted = TRUE;
+ soup_session_abort(http->soup);
+}
+
/**
* grits_http_free:
* @http: the #GritsHttp to free
void grits_http_free(GritsHttp *http)
{
g_debug("GritsHttp: free - %s", http->prefix);
- soup_session_abort(http->soup);
g_object_unref(http->soup);
g_free(http->prefix);
g_free(http);
GritsCacheType mode, GritsChunkCallback callback, gpointer user_data)
{
g_debug("GritsHttp: fetch - %s mode=%d", local, mode);
+ if (http->aborted) {
+ g_debug("GritsPluginSat: _load_tile_thread - aborted");
+ return NULL;
+ }
gchar *path = _get_cache_path(http, local);
/* Unlink the file if we're refreshing it */