Skip to content

Commit ed03686

Browse files
authored
Merge pull request #117 from DavidPerish/feature/add-configureawait-false-to-analyticsprocessor
Add ConfigureAwait(false) to AnalyticsProcessor
2 parents e585d6f + e59a91a commit ed03686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Flagsmith.FlagsmithClient/AnalyticsProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public async Task Flush()
7171
_CustomHeaders?.ForEach(kvp => request.Headers.Add(kvp.Key, kvp.Value));
7272
var tokenSource = new CancellationTokenSource();
7373
tokenSource.CancelAfter(TimeSpan.FromSeconds(_TimeOut));
74-
var response = await _HttpClient.SendAsync(request, tokenSource.Token);
74+
var response = await _HttpClient.SendAsync(request, tokenSource.Token).ConfigureAwait(false);
7575
response.EnsureSuccessStatusCode();
7676
_Logger?.LogInformation("Analytics posted: " + analyticsJson);
7777
AnalyticsDataThreads.Clear();
@@ -116,7 +116,7 @@ public async Task TrackFeature(string featureName)
116116
int _LastFlushedInterval = (DateTime.Now - _LastFlushed).Seconds;
117117

118118
if (_LastFlushedInterval > _FlushIntervalSeconds)
119-
await Flush();
119+
await Flush().ConfigureAwait(false);
120120
}
121121

122122
/// <summary>

0 commit comments

Comments
 (0)