Skip to content

Commit 58ba907

Browse files
authored
Merge pull request #58 from Flagsmith/fix/stop_repeated_calls_to_updated_environment
fix: Stop repeated calls to update environment when polling manager is set
2 parents 4523496 + 472b86d commit 58ba907

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/flagsmith.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def load_offline_handler
104104
def environment_data_polling_manager
105105
return nil unless @config.local_evaluation?
106106

107-
update_environment
107+
update_environment if @environment_data_polling_manager.nil?
108108

109109
@environment_data_polling_manager ||= Flagsmith::EnvironmentDataPollingManager.new(
110110
self, environment_refresh_interval_seconds

0 commit comments

Comments
 (0)