Skip to content

Commit bdaa7be

Browse files
Revert "Eventdispatcherissue (#35) (#54)"
This reverts commit 5df7cfb.
1 parent 53bd00f commit bdaa7be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

OptimizelySDK/Event/Dispatcher/HttpClientEventDispatcher45.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static HttpClientEventDispatcher45()
4141
/// <summary>
4242
/// Dispatch an Event asynchronously
4343
/// </summary>
44-
private async Task DispatchEventAsync(LogEvent logEvent)
44+
private async void DispatchEventAsync(LogEvent logEvent)
4545
{
4646
try
4747
{
@@ -68,11 +68,13 @@ private async Task DispatchEventAsync(LogEvent logEvent)
6868
}
6969

7070
/// <summary>
71-
/// Dispatch an event
71+
/// Dispatch an event Asynchronously by creating a new task and calls the
72+
/// Async version of DispatchEvent
73+
/// This is a "Fire and Forget" option
7274
/// </summary>
7375
public void DispatchEvent(LogEvent logEvent)
7476
{
75-
Task.Run(() => DispatchEventAsync(logEvent)).Wait();
77+
Task.Run(() => DispatchEventAsync(logEvent));
7678
}
7779
}
7880
}

0 commit comments

Comments
 (0)