pull: Properly propagate errors

This commit is contained in:
Colin Walters 2012-06-20 15:42:41 -04:00
parent 0cb4fe66f8
commit 7cce6e5ba1
1 changed files with 8 additions and 4 deletions

View File

@ -185,11 +185,15 @@ check_outstanding_requests_handle_error (OtPullData *pull_data,
g_main_loop_quit (pull_data->loop);
if (error)
{
pull_data->caught_error = TRUE;
if (pull_data->async_error)
g_error_free (error);
if (!pull_data->caught_error)
{
pull_data->caught_error = TRUE;
g_propagate_error (pull_data->async_error, error);
}
else
g_propagate_error (pull_data->async_error, error);
{
g_error_free (error);
}
}
}