Skip to content
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

Ignore channel events for unknown JS Views #2363

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

jonatanklosko
Copy link
Member

Closes #2362.

We are multiplexing JSView events through a single channel, so each JSView needs to send "connect" event to register. When the connection is lost the JSView information is discarded and it needs to register again, by remounting the client-side hook (when the LV channel is reconnected):

disconnected() {
// Reinitialize on reconnection
this.el.removeAttribute("id");
},

However, it is possible that when both channels reconnect we push (or flush accumulated) events, before the hook is destroyed and mounted again.

I was considering solving this on the client, but in this case I think it's actually simpler and more reliable to do it on the server.

@jonatanklosko jonatanklosko merged commit 9076e15 into main Nov 17, 2023
7 checks passed
@jonatanklosko jonatanklosko deleted the jk-js-view-channel branch November 17, 2023 12:10
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.

Kino.JS.Live output crashes sometimes
2 participants