Skip to content

Implement keepalive messages for SSE connections - #829

Merged
TBlueF merged 2 commits into
BlueMap-Minecraft:masterfrom
pR0Ps:bugfix/sse-keepalive
Aug 7, 2026
Merged

Implement keepalive messages for SSE connections#829
TBlueF merged 2 commits into
BlueMap-Minecraft:masterfrom
pR0Ps:bugfix/sse-keepalive

Conversation

@pR0Ps

@pR0Ps pR0Ps commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Implements sending an SSE comment (:) every 30 seconds if no other event has been enqueued to prevent the connection from timing out and being closed.

pR0Ps added 2 commits August 7, 2026 00:15
Implements sending a comment (`:`) every 30 seconds if no other event
has been enqueued to prevent the connection from timing out and being
closed.
This allows `SseConnectionManager.broadcast` to create a single object
and give it to all the `SseConnection` instances instead of
`SseConnection.enqueue` having to instantiate a new `String[]` each
time.

It also makes the logic that sends keepalives cleaner.
@pR0Ps
pR0Ps force-pushed the bugfix/sse-keepalive branch from e20ef6e to 5c69501 Compare August 7, 2026 04:27
@TBlueF
TBlueF merged commit ef0bbaf into BlueMap-Minecraft:master Aug 7, 2026
3 checks passed
@pR0Ps
pR0Ps deleted the bugfix/sse-keepalive branch August 7, 2026 08:40
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.

2 participants