Skip to content

Conversation

@AlexanderKolberg
Copy link
Contributor

@AlexanderKolberg AlexanderKolberg commented Sep 26, 2024

If the stream gets dropped without being properly closed, the client needs to end the stream. The current implementation errors out with an global error instead of triggering the onError hook.
This is caused by an incorrect throwing of an error inside of a setIntervall (see "the this problem" on MDN)

This resolves the problem, by setting an error flag that triggers the timeout error. Instead of throwing directly from the setIntervall

@AlexanderKolberg AlexanderKolberg marked this pull request as ready for review September 27, 2024 06:33
@pkieltyka pkieltyka self-requested a review September 30, 2024 16:28
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Let's look into this syntax proposal too:
webrpc/webrpc#311

@VojtechVitek VojtechVitek merged commit ca8157b into master Oct 2, 2024
2 checks passed
@VojtechVitek VojtechVitek deleted the sse-timeout-bug branch October 2, 2024 13:18
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.

4 participants