Skip to content

fix: end the stream when replay fails instead of leaking - #9

Open
damusix wants to merge 2 commits into
fix/marshal-responsefrom
fix/replay-failure-leak
Open

damusix wants to merge 2 commits into
fix/marshal-responsefrom
fix/replay-failure-leak

Conversation

@damusix

@damusix damusix commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Stacked on #7. Retarget to main once #7 merges.

If replay fails, the session now closes and the stream ends with a 200, and the error is reported through request.log(). An error status would make EventSource stop reconnecting for good. An ended stream makes it reconnect after retry, and the normal cleanup runs: onUnsubscribe fires and the maxSessions slot is freed.

publish(), broadcast() and the built-in replayers' record() now reject event ids containing a null character, so a bad id can't get into the replay buffer.

Closes #8

An error status stops EventSource for good; an ended stream makes it
retry and runs the normal cleanup. Null-character ids are rejected
before they reach the replay buffer.

Closes #8
@Marsup Marsup self-assigned this Oct 7, 2026
@Marsup Marsup added the bug Bug or defect label Oct 7, 2026
@Marsup Marsup added this to the 1.1.1 milestone Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants