Skip to content

Commit

Permalink
Sending queued messages should be after reattach.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Jun 30, 2024
1 parent 16b3806 commit 305d8db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/ARTRealtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -742,13 +742,12 @@ - (void)performTransitionToState:(ARTRealtimeConnectionState)state withParams:(A
}

if ([self shouldSendEvents]) {
[self sendQueuedMessages];

for (ARTRealtimeChannelInternal *channel in channels) {
// Reattach channel regardless resume success - RTN15c6, RTN15c7
ARTAttachRequestParams *const params = [[ARTAttachRequestParams alloc] initWithReason:stateChange.reason];
[channel reattachWithParams:params];
}
[self sendQueuedMessages];
}
else if (![self shouldQueueEvents]) {
if (!channelStateChangeParams) {
Expand Down

0 comments on commit 305d8db

Please sign in to comment.