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

AmityMessage stream never closes #28

Open
szymon-zawadzki-netbulls opened this issue Sep 15, 2023 · 0 comments
Open

AmityMessage stream never closes #28

szymon-zawadzki-netbulls opened this issue Sep 15, 2023 · 0 comments

Comments

@szymon-zawadzki-netbulls
messageLiveCollection = MessageLiveCollection(
 request: () => AmityChatClient.newMessageRepository()
   .getMessages(channelId)
   .build(),
);

messageLiveSubscription = messageLiveCollection
 ?.getStreamController()
   .stream
   .listen(_onNewMessages);

...

messageLiveSubscription?.cancel();

Despite closing the subscription to the message stream. Underhood the stream is not closed.

You can observe that the stream inside MessageObserveUsecase::listen is never closed. Every opening new MessageLiveCollection stream causes a new stream in MessageObserveUsecase::listen. This is a serious bug that causes memory leaks.

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

No branches or pull requests

1 participant