File tree 1 file changed +3
-5
lines changed
OptimizelySDK/Event/Dispatcher
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ static HttpClientEventDispatcher45()
41
41
/// <summary>
42
42
/// Dispatch an Event asynchronously
43
43
/// </summary>
44
- private async void DispatchEventAsync ( LogEvent logEvent )
44
+ private async Task DispatchEventAsync ( LogEvent logEvent )
45
45
{
46
46
try
47
47
{
@@ -68,13 +68,11 @@ private async void DispatchEventAsync(LogEvent logEvent)
68
68
}
69
69
70
70
/// <summary>
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
71
+ /// Dispatch an event
74
72
/// </summary>
75
73
public void DispatchEvent ( LogEvent logEvent )
76
74
{
77
- Task . Run ( ( ) => DispatchEventAsync ( logEvent ) ) ;
75
+ Task . Run ( ( ) => DispatchEventAsync ( logEvent ) ) . Wait ( ) ;
78
76
}
79
77
}
80
78
}
You can’t perform that action at this time.
0 commit comments