Skip to content

Commit

Permalink
Merge pull request #90 from Cysharp/feature/FixCancelIssueOnIl2cpp
Browse files Browse the repository at this point in the history
Fix an issue where canceling does not work correctly on IL2CPP
  • Loading branch information
mayuki authored Aug 6, 2024
2 parents e97847f + 398f8aa commit c2579d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/YetAnotherHttpHandler/ResponseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public async Task<HttpResponseMessage> GetResponseAsync()
#if UNITY_2021_1_OR_NEWER
// NOTE: .NET's HttpClient will unwrap OperationCanceledException if HttpRequestException is thrown, including OperationCanceledException.
// However, Unity's Mono does not do this, so you will need to unwrap it manually.
catch (Exception e) when (e is TaskCanceledException or OperationCanceledException)
catch (OperationCanceledException)
{
throw;
}
Expand Down

0 comments on commit c2579d7

Please sign in to comment.