Sorry that was not very clear.
In the app, I have a screen that shows current chats.
The list of chats comes from my backend, not Sendbird. But it doesn’t include the number of unread messages for each chat.
To get that info, in that screen, I connect to the SDK, get each channel, grab their unread count and disconnect.
When a user clicks on one of the current chats, I open the chat screen when I connect to the SDK, get the channel, load messages, listen for new messages using the handler and disconnect as soon as the user exits that screen, disconnect from the SDK.
From error reports I see in Sentry, it seems that the connection lost between the connect() and the loadMessages (i.e. createPreviousMessageListQuery()). I’m wondering if it’s because the previous hasn’t had a chance to disconnect the SDK in the background and just did in between connect() and loadMessages().