Skip to content

Fix: when app is put in bg, SSE connection executes stream completely#43

Open
anuraggoel-tif wants to merge 1 commit intoImgkl:mainfrom
anuraggoel-tif:appbg-sse-connection-fix
Open

Fix: when app is put in bg, SSE connection executes stream completely#43
anuraggoel-tif wants to merge 1 commit intoImgkl:mainfrom
anuraggoel-tif:appbg-sse-connection-fix

Conversation

@anuraggoel-tif
Copy link

Introduced change in eventflux-2.2.1/lib/client.dart- disconnect() function now instead of directly calling _stop() first checks if _streamController is null or not and if not null then lets the stream complete itself and then connection closes after timeout of 5 seconds.

in line: 405 ensured that we clean up the internal resources so consumers can see closed stream
in line: 406 added fix to notify connection close so that callers can free up their resources.

Imgkl
Imgkl previously approved these changes Jan 13, 2026
@Imgkl Imgkl dismissed their stale review January 16, 2026 06:36

Testing is needed

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