-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetchEventSource() repeats request indefinitely #79
Comments
make sure your server code is responding with:
|
It's external server and I can't control it, but it has following HTTP response headers:
|
This will only happen when server keeps sending you events. On message only fires when server sends events. To mitigate this (since you don't have control over the server): call abort using an AbortController once you get a set of messages you need and reconnect when you need them again. |
Set the "openWhenHidden" true and can be solved. |
vConsole may cause this issue, remove it. |
I have SSE-endpoint
http://localhost/sse-endpoint
that returns next data:I use this client code to fetch data:
Expected output:
Actual output:
In devtools tab "Network" I can see that requests to
/sse-endpoint
continues indefinitelyThe text was updated successfully, but these errors were encountered: