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

ChatClient close method #390

Open
sacOO7 opened this issue Nov 7, 2024 · 2 comments
Open

ChatClient close method #390

sacOO7 opened this issue Nov 7, 2024 · 2 comments

Comments

@sacOO7
Copy link

sacOO7 commented Nov 7, 2024

  • If ChatClient is not needed or we want to free up all underlying channels before closing the app, browser tab, chatClient.close will release all channels.
  • Currently, devs need to iterate over each channel and release it explicitly. This will also include unregistering subscription callbacks.
  • Point is, close should free up all those resources in one explicit call.

┆Issue is synchronized with this Jira Task by Unito

@sacOO7
Copy link
Author

sacOO7 commented Nov 7, 2024

Feel free to put your thoughts !

@AndyTWF
Copy link
Collaborator

AndyTWF commented Nov 7, 2024

free up all underlying channels before closing the app

Do you mean if the app shuts down entirely, or if it simply goes into the background / the chat component is closed? I presume the latter, as in the former case, freeing everything up happens by virtue of quitting the app / closing the browser tab.

Currently, devs need to iterate over each channel and release it explicitly

To be clear, you're referring to each room, as a group of channels pertaining to a chat room, rather than individual realtime channels?

We'll need to think about this one a bit more and its use-case - my preference would be to defer it for now so as to avoid adding complexity to the room lifecycle (notwithstanding any future requests for the functionality).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants