-
Notifications
You must be signed in to change notification settings - Fork 437
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
Why are WS/SEE not being closed after turbo-stream-source is gone? #969
Comments
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Thank you for opening this issue, and for sharing your solution. I've opened #970 to resolve it. |
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
Closes [hotwired#969][] When a `<turbo-stream-source>` element is removed, close the connection that is created during connection. [hotwired#969]: hotwired#969
is this issue causing response on network tab which keep receives rails 7.1.3 |
I am using Hotwired/Turbo in a go application.
On one specific page, I want to update several partials from the server asynchronously as they arrive to the server through external apis (openAI in this case).
I used this on my views:
It normally works as expected, and I can update the page nicely.
But the moment that I navigate to another page (so the turbo-stream-source gets unloaded), the ws/see connection is ignored but not closed.
turbo/src/elements/stream_source_element.ts
Lines 14 to 16 in 0826b81
This creates unlimited connections until I reach the browsers max, and can't navigate anymore.
I fixed it locally by modifying the source and manually closing the connection with
this.streamSource.close();
:The change seems obvious for my use case, but makes me wonder if I am using hotwire turbo as design.
Are only fixed constant connections like
/cable
in rails the only recommended use case?The text was updated successfully, but these errors were encountered: