Skip to content

fix(helper): fan events out to every connection#13

Merged
0xnirapod merged 1 commit into
mainfrom
feat/helper-multi-sink
Jun 29, 2026
Merged

fix(helper): fan events out to every connection#13
0xnirapod merged 1 commit into
mainfrom
feat/helper-multi-sink

Conversation

@athexweb3

Copy link
Copy Markdown
Contributor

RequestRouter held a single event sink, so the last connection served stole event delivery from any earlier reader connection (and a one-shot command connection cleared it on close). Replace it with an id-keyed sink registry: attachEventSink returns an id, detachEventSink(id) removes that one, and the forward path snapshots the sinks under the lock then invokes them outside it, so every active connection receives every event. Command token-gating is unchanged.

`RequestRouter` kept a single event sink, so the last connection served stole event delivery from
any earlier reader. Hold an id-keyed sink registry instead and fan each event out to every
registered connection. The snapshot is taken under the lock; sinks run outside it.
@athexweb3
athexweb3 requested a review from a team as a code owner June 29, 2026 06:45
@0xnirapod
0xnirapod merged commit e9102fd into main Jun 29, 2026
3 checks passed
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