mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	unix-streams: Ensure we get cancelled errors if the cancellable is cancelled
This commit is contained in:
		@@ -146,6 +146,7 @@ main_thread_skipped (GObject *source, GAsyncResult *res, gpointer user_data)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (g_cancellable_is_cancelled (main_cancel))
 | 
					  if (g_cancellable_is_cancelled (main_cancel))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					      g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
 | 
				
			||||||
      do_main_cancel (out);
 | 
					      do_main_cancel (out);
 | 
				
			||||||
      g_clear_error (&err);
 | 
					      g_clear_error (&err);
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
@@ -181,6 +182,7 @@ main_thread_read (GObject *source, GAsyncResult *res, gpointer user_data)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (g_cancellable_is_cancelled (main_cancel))
 | 
					  if (g_cancellable_is_cancelled (main_cancel))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					      g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
 | 
				
			||||||
      do_main_cancel (out);
 | 
					      do_main_cancel (out);
 | 
				
			||||||
      g_clear_error (&err);
 | 
					      g_clear_error (&err);
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
@@ -218,6 +220,7 @@ main_thread_wrote (GObject *source, GAsyncResult *res, gpointer user_data)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (g_cancellable_is_cancelled (main_cancel))
 | 
					  if (g_cancellable_is_cancelled (main_cancel))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					      g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
 | 
				
			||||||
      do_main_cancel (out);
 | 
					      do_main_cancel (out);
 | 
				
			||||||
      g_clear_error (&err);
 | 
					      g_clear_error (&err);
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user