chore(livestream): Don't send messages to unsubscibed clients in the livestream service#45977
Closed
jordanm-posthog wants to merge 1 commit intomasterfrom
Closed
chore(livestream): Don't send messages to unsubscibed clients in the livestream service#45977jordanm-posthog wants to merge 1 commit intomasterfrom
jordanm-posthog wants to merge 1 commit intomasterfrom
Conversation
jordanm-posthog
commented
Jan 27, 2026
| // considered "inactive" when all consumers have unregistered. | ||
| type Counter struct { | ||
| keys map[string]int | ||
| mu sync.RWMutex |
Contributor
Author
There was a problem hiding this comment.
Not sure if there is a "better" way to do thread safe look ups. I don't love the idea of using locks here but it seems relatively safe (for now)
Contributor
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
Contributor
|
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Livestream service currently sends messages regardless if the user is actually subscribed to the SSE stream to receive it.
Changes
Countertype to track active subscriptionsHow did you test this code?
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Publish to changelog?
No