Skip to content

Feature/evict slow clients - #2

Open
jeetvdevvee wants to merge 3 commits into
masterfrom
feature/evict-slow-clients
Open

Feature/evict slow clients#2
jeetvdevvee wants to merge 3 commits into
masterfrom
feature/evict-slow-clients

Conversation

@jeetvdevvee

Copy link
Copy Markdown
Collaborator

PR Name

Feature/evict slow clients

Purpose

Forked 'github.com/r3labs/sse/v2' to our repo , so that we can make changes on how SSE connection works.

Summary

Change: Added an EvictSlowClients option (on Server, applied to each Stream at creation) that makes the event fan-out loop non-blocking per subscriber. When a subscriber's buffer is full, it's evicted immediately instead of blocking delivery. Eviction and normal disconnects now share one unsubscribe() path that safely removes the subscriber and fires OnUnsubscribe exactly once.

Purpose: Let one slow or stalled SSE client be dropped instead of stalling the whole stream.

What it solves:
previously, one slow client's full buffer would block the fan-out goroutine, freezing event delivery to every other subscriber on that stream.

Testing Done

Locally tested with different usecases

-> Opening multiple connections to server
-> Turning off/on airplane mode on tablet
-> Tested all functionalities
-> Switching between two different versions of the app
-> Switching networks back and forth

Testing to Do

Need to be tested thoroughly with server changes

Related PRs

Does this PR affect the software document?

Software Document PR:

Does this PR affect the overall design inputs?

Design Inputs PR:

Any other related PRs:

dependabot Bot and others added 3 commits July 29, 2026 19:54
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.0.0-20191116160921-f9c825593386 to 0.55.0
- [Commits](https://github.com/golang/net/commits/v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
@jeetvdevvee jeetvdevvee self-assigned this Jul 29, 2026
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.

1 participant