Skip to content

Commit 749f592

Browse files
authored
Merge pull request #545 from zapcannon87/master
Fix bug of handling session closed
2 parents 4bd7203 + 142c8c1 commit 749f592

File tree

6 files changed

+18
-23
lines changed

6 files changed

+18
-23
lines changed

.pullapprove.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ reset_on_push: false
55
reviewers:
66
required: 1
77
members:
8-
- tang3w
98
- jwfing
109
- zapcannon87
1110
name: default

AVOS/AVOSCloud/UserAgent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define SDK_VERSION @"v11.5.0"
1+
#define SDK_VERSION @"v11.5.1"

AVOS/AVOSCloudIM/Client/AVIMClient.m

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,24 +1016,20 @@ - (void)process_session_closed:(AVIMGenericCommand *)inCommand
10161016
self->_status = AVIMClientStatusClosed;
10171017
[self clearSessionTokenAndTTL];
10181018

1019-
int32_t code = (sessionCommand.hasCode ? sessionCommand.code : 0);
1020-
1021-
if (code == AVIMErrorCodeSessionConflict) {
1022-
[self->_pushManager removingClientIdFromChannels];
1023-
[self->_socketWrapper setActivatingReconnectionEnabled:false];
1024-
[self->_socketWrapper close];
1025-
id <AVIMClientDelegate> delegate = self->_delegate;
1026-
SEL sel = @selector(client:didOfflineWithError:);
1027-
if (delegate && [delegate respondsToSelector:sel]) {
1028-
[self invokeInUserInteractQueue:^{
1029-
NSError *aError = ({
1030-
LCIMProtobufCommandWrapper *commandWrapper = [LCIMProtobufCommandWrapper new];
1031-
commandWrapper.inCommand = inCommand;
1032-
commandWrapper.error;
1033-
});
1034-
[delegate client:self didOfflineWithError:aError];
1035-
}];
1036-
}
1019+
[self->_pushManager removingClientIdFromChannels];
1020+
[self->_socketWrapper setActivatingReconnectionEnabled:false];
1021+
[self->_socketWrapper close];
1022+
id <AVIMClientDelegate> delegate = self->_delegate;
1023+
SEL sel = @selector(client:didOfflineWithError:);
1024+
if (delegate && [delegate respondsToSelector:sel]) {
1025+
[self invokeInUserInteractQueue:^{
1026+
NSError *aError = ({
1027+
LCIMProtobufCommandWrapper *commandWrapper = [LCIMProtobufCommandWrapper new];
1028+
commandWrapper.inCommand = inCommand;
1029+
commandWrapper.error;
1030+
});
1031+
[delegate client:self didOfflineWithError:aError];
1032+
}];
10371033
}
10381034
}
10391035

AVOSCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloud'
3-
s.version = '11.5.0'
3+
s.version = '11.5.1'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud Objective-C SDK'
66
s.authors = 'LeanCloud'

AVOSCloudIM.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloudIM'
3-
s.version = '11.5.0'
3+
s.version = '11.5.1'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud IM Objective-C SDK'
66
s.authors = 'LeanCloud'

AVOSCloudLiveQuery.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloudLiveQuery'
3-
s.version = '11.5.0'
3+
s.version = '11.5.1'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud LiveQuery Objective-C SDK'
66
s.authors = 'LeanCloud'

0 commit comments

Comments
 (0)