handle offline user connect case

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-06-18 15:27:38 +05:30
parent 24931f7f30
commit 0fcea3f546
@@ -289,6 +289,10 @@ class StreamChatClient {
final event = await openConnection();
return event;
} catch (e, stk) {
if (e is StreamChatNetworkError && e.isRetriable) {
final event = await _chatPersistenceClient?.getConnectionInfo();
if (event != null) return event;
}
logger.severe('error connecting user : ${ownUser.id}', e, stk);
rethrow;
}