Skip to content

[FSSDK-9055] fix: send config update notification before unblocking #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions OptimizelySDK/Config/PollingProjectConfigManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2019-2020, 2022-2023 Optimizely
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -25,7 +25,7 @@
namespace OptimizelySDK.Config
{
/// <summary>
/// Abstract class that implements ProjectConfigManager interface and provides
/// Abstract class that implements ProjectConfigManager interface and provides
/// basic scheduling and caching.
/// Instances of this class, must implement the <see cref="Poll()"/> method
/// which is responsible for fetching a given ProjectConfig.
Expand Down Expand Up @@ -181,11 +181,10 @@ public bool SetConfig(ProjectConfig projectConfig)
CurrentProjectConfig = projectConfig;
SetOptimizelyConfig(CurrentProjectConfig);

// SetResult raise exception if called again, that's why Try is used.
CompletableConfigManager.TrySetResult(true);

NotifyOnProjectConfigUpdate?.Invoke();

// SetResult raise exception if called again, that's why Try is used.
CompletableConfigManager.TrySetResult(true);

return true;
}
Expand Down