Skip to content

Commit 61a7ce8

Browse files
feat: set SSE connections as the default
1 parent b6d12c8 commit 61a7ce8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/main/java/com/devcycle/sdk/server/local/managers/EnvironmentConfigManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public boolean isConfigInitialized() {
8383
private ProjectConfig getConfig() throws DevCycleException {
8484
Call<ProjectConfig> config = this.configApiClient.getConfig(this.sdkKey, this.configETag, this.configLastModified);
8585
this.config = getResponseWithRetries(config, 1);
86-
if (this.options.isEnableBetaRealtimeUpdates()) {
86+
if (!this.options.isDisableRealtimeUpdates()) {
8787
try {
8888
URI uri = new URI(this.config.getSse().getHostname() + this.config.getSse().getPath());
8989
if (sseManager == null) {

src/main/java/com/devcycle/sdk/server/local/model/DevCycleLocalOptions.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public class DevCycleLocalOptions implements IDevCycleOptions {
2828

2929
private boolean disableAutomaticEventLogging = false;
3030

31+
private boolean disableRealtimeUpdates = false;
32+
33+
/**
34+
* @deprecated real time updates are enabled by default now
35+
*/
36+
@Deprecated
3137
private boolean enableBetaRealtimeUpdates = false;
3238

3339
@JsonIgnore
@@ -52,7 +58,9 @@ public DevCycleLocalOptions(
5258
boolean disableCustomEventLogging,
5359
IDevCycleLogger customLogger,
5460
IRestOptions restOptions,
55-
boolean enableBetaRealtimeUpdates
61+
@Deprecated
62+
boolean enableBetaRealtimeUpdates,
63+
boolean disableRealtimeUpdates
5664
) {
5765
this.configRequestTimeoutMs = configRequestTimeoutMs > 0 ? configRequestTimeoutMs : this.configRequestTimeoutMs;
5866
this.configPollingIntervalMS = getConfigPollingIntervalMS(configPollingIntervalMs, configPollingIntervalMS);
@@ -67,6 +75,7 @@ public DevCycleLocalOptions(
6775
this.customLogger = customLogger;
6876
this.restOptions = restOptions;
6977
this.enableBetaRealtimeUpdates = enableBetaRealtimeUpdates;
78+
this.disableRealtimeUpdates = disableRealtimeUpdates;
7079

7180
if (this.flushEventQueueSize >= this.maxEventQueueSize) {
7281
DevCycleLogger.warning("flushEventQueueSize: " + this.flushEventQueueSize + " must be smaller than maxEventQueueSize: " + this.maxEventQueueSize);

0 commit comments

Comments
 (0)