[glib: 2/3] unix-streams: Ensure we get cancelled errors if the cancellable is cancelled
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/3] unix-streams: Ensure we get cancelled errors if the cancellable is cancelled
- Date: Mon, 10 Oct 2022 12:02:57 +0000 (UTC)
commit c8e2d4a38dc36c44e7daec8056538dd35ee3c9c1
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Sep 13 16:30:12 2022 +0200
unix-streams: Ensure we get cancelled errors if the cancellable is cancelled
gio/tests/unix-streams.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gio/tests/unix-streams.c b/gio/tests/unix-streams.c
index 16cec26a26..e32e2861d3 100644
--- a/gio/tests/unix-streams.c
+++ b/gio/tests/unix-streams.c
@@ -146,6 +146,7 @@ main_thread_skipped (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
g_clear_error (&err);
return;
@@ -181,6 +182,7 @@ main_thread_read (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
g_clear_error (&err);
return;
@@ -218,6 +220,7 @@ main_thread_wrote (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
g_clear_error (&err);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]