Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit 8c53f4a

Browse files
committed
Add imClientClosed delegate method
1 parent b6db2a7 commit 8c53f4a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ChatKit/Class/Tool/Service/LCCKSessionService.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ - (void)imClientResumed:(AVIMClient *)imClient {
162162
[NSNotificationCenter.defaultCenter postNotificationName:LCCKNotificationSessionResumed object:nil];
163163
}
164164

165+
- (void)imClientClosed:(AVIMClient *)imClient error:(NSError *)error
166+
{
167+
[self updateConnectStatus];
168+
[imClient openWithOption:AVIMClientOpenOptionReopen callback:^(BOOL succeeded, NSError * _Nullable error) {
169+
[self updateConnectStatus];
170+
if (succeeded) {
171+
[NSNotificationCenter.defaultCenter postNotificationName:LCCKNotificationSessionResumed object:nil];
172+
} else {
173+
LCCKLog(@"%@", error.description);
174+
}
175+
}];
176+
}
177+
165178
- (void)handleSingleSignOnError:(NSError *)aError callback:(LCCKBooleanResultBlock)aCallback {
166179
if (aError.code == 4111) {
167180
[self resetService];

0 commit comments

Comments
 (0)