This PR fixes the usage of CancellationTokens in the TwitchHelixApiService. CancellationTokens weren't passed to the Polly policies, but instead directly passed into the action that was executed by the policies. This has the side-effect that when a call is put on-hold by for example a retry policy, you'd have to wait till the policy actually retries before it can actually return. The change in this PR however, makes it return instantly instead.
Other than that, this PR also includes a breaking change by changing the nullable CancellationToken argument into non-nullable argument (with a fallback to the default value, which is CancellationToken.None)
This PR fixes the usage of CancellationTokens in the TwitchHelixApiService. CancellationTokens weren't passed to the Polly policies, but instead directly passed into the action that was executed by the policies. This has the side-effect that when a call is put on-hold by for example a retry policy, you'd have to wait till the policy actually retries before it can actually return. The change in this PR however, makes it return instantly instead.
Other than that, this PR also includes a breaking change by changing the nullable CancellationToken argument into non-nullable argument (with a fallback to the default value, which is
CancellationToken.None
)