Skip to content

Commit e92ab7c

Browse files
authored
fix update method not called with await (#95)
Co-authored-by: Wenxi Zeng <[email protected]>
1 parent 47a09ff commit e92ab7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Analytics-CSharp/Segment/Analytics/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct Settings
1616

1717
public partial class Analytics
1818
{
19-
internal async void Update(Settings settings) {
19+
internal async Task Update(Settings settings) {
2020
System systemState = await Store.CurrentState<System>();
2121
HashSet<int> initializedPlugins = new HashSet<int>();
2222
Timeline.Apply(plugin => {
@@ -49,7 +49,7 @@ await Scope.WithContext(NetworkIODispatcher, async () =>
4949
settings = systemState._settings;
5050
}
5151

52-
Update(settings.Value);
52+
await Update(settings.Value);
5353
await Store.Dispatch<System.ToggleRunningAction, System>(new System.ToggleRunningAction(true));
5454
}
5555
}

0 commit comments

Comments
 (0)