Skip to content

Commit 472b86d

Browse files
committed
Stop repeated calls to update environment when polling manager is set
1 parent 4523496 commit 472b86d

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)