aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/e-http-request.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index fb516f98ba..a4a35567ed 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -379,16 +379,18 @@ handle_http_request (GSimpleAsyncResult *res,
camel_stream_write (
cache_stream, message->response_body->data,
message->response_body->length, cancellable, &error);
+
+ camel_stream_close (cache_stream, cancellable, NULL);
+ g_object_unref (cache_stream);
+
if (error != NULL) {
- g_warning (
- "Failed to write data to cache stream: %s",
- error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_warning (
+ "Failed to write data to cache stream: %s",
+ error->message);
g_clear_error (&error);
goto cleanup;
}
-
- camel_stream_close (cache_stream, cancellable, NULL);
- g_object_unref (cache_stream);
}
/* Send the response body to WebKit */