Closed mitchell-arthur-wealth closed 2 years ago
Thanks for the request. We will provide an update when this is added
Hi @mitchell-arthur-wealth - looking at this request now. For our other SDKs, we have a timeout option for you to configure to decide how long you want to wait for network requests, so it would be preferable if we keep the same pattern here. Would something like https://github.com/statsig-io/dotnet-sdk/pull/17 work for you too?
@jkw-statsig I think the CancellationToken is more flexible, but were going to use the CancellationToken to configure a timeout so this works for me! 😄
yeah I agree. I think they can co-exist, so if a cancellation token is needed where a timeout wouldn't work, we're happy to add that in the future. For now let me get this added quickly so you can get unblocked sooner.
Sounds good, thanks!
@mitchell-arthur-wealth a new version was just published with this option https://github.com/statsig-io/dotnet-sdk/releases/tag/v1.11.0
Enhancement Request:
In the StatsigClient, we need CancellationToken in the Initialize and UpdateUser methods. This will allow use to timeout any asynchronous connections to Statsig if there are any long running connection issues.
https://github.com/statsig-io/dotnet-sdk/blob/5a32f584414e3b503393b7d62f5209aab4292f2f/dotnet-statsig/src/Statsig/Client/StatsigClient.cs#L11
https://github.com/statsig-io/dotnet-sdk/blob/5a32f584414e3b503393b7d62f5209aab4292f2f/dotnet-statsig/src/Statsig/Client/StatsigClient.cs#L80