Open iuri-gg opened 1 year ago
basing off of this
https://github.com/mclintprojects/actioncable-vue/issues/66#issuecomment-1280319481
i added onBeforeUnmount to the imports and also added
onBeforeUnmount(() => {
cable.unsubscribe( 'MyChannel' )
cable._removeChannel( 'MyChannel', instance.uid )
})
there's no disconnected message, but it's removed from the subscriptions list.
Describe the bug I am using actioncable-vue with Vue 3 app. When I call
app.unmount()
, ActionCable connection is not terminated.To Reproduce Steps to reproduce the behaviour:
app.unmount();
Expected behaviour ActionCable websocket connection should close after vue app unmounts.
Plugin version (please complete the following information): 2.5.1
Additional context I create and destroy Vue 3 apps multiple times on one page and that causes multiple action cable connections to stay open to the server, even though only one app is mounted at a time.