Skip to content

fix(sse): correct SSE-connected config polling interval from 15 hours to 15 minutes - #198

Merged
jonathannorris merged 2 commits into
mainfrom
fix/sse-polling-interval
Aug 6, 2026
Merged

fix(sse): correct SSE-connected config polling interval from 15 hours to 15 minutes#198
jonathannorris merged 2 commits into
mainfrom
fix/sse-polling-interval

Conversation

@jonathannorris

@jonathannorris jonathannorris commented Aug 5, 2026

Copy link
Copy Markdown
Member

pollingIntervalSSEMS was 15 * 60 * 60 * 1000, which is 15 hours, not 15 minutes. Once SSE connects, handleSSEStarted swaps the normal polling interval for this one, so the backstop poll that catches missed SSE messages was effectively never running. js-sdks uses 10 minutes for the same backstop, go-server-sdk uses 5.

Also renames it to SSE_POLL_INTERVAL_MS to match the other interval constants and make the units explicit.

Notes

handleSSEError still only logs: it doesn't reset isSSEConnected or restore the normal polling interval. Both js-sdks and go-server-sdk do restore polling on SSE failure, happy to do that as a follow-up since it's a behaviour change rather than a units fix.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the SSE-connected configuration “backstop” polling interval in EnvironmentConfigManager so that polling continues to run at a meaningful cadence after SSE connects (minutes rather than hours), helping ensure missed SSE messages are still eventually reconciled.

Changes:

  • Correct SSE backstop polling interval from 15 hours to 15 minutes.
  • Rename the interval constant to SSE_POLL_INTERVAL_MS to match other interval constants and make units explicit.
  • Update SSE-start handling to use the renamed constant for logging and scheduling.
Suppressed comments (1)

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

  • This debug log prints a bare number for the interval; adding the unit (ms) makes the message unambiguous when troubleshooting.
        DevCycleLogger.debug("SSE Connected - setting polling interval to " + SSE_POLL_INTERVAL_MS);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jonathannorris and others added 2 commits August 6, 2026 09:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jonathannorris
jonathannorris merged commit 40ded67 into main Aug 6, 2026
8 checks passed
@jonathannorris
jonathannorris deleted the fix/sse-polling-interval branch August 6, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants