Skip to content

Commit

Permalink
Merge pull request #1822 from ably/fix/1821-extra-re-attach
Browse files Browse the repository at this point in the history
[SDK-3930] Removed unnecessary re-attach attempt.
  • Loading branch information
maratal authored Nov 25, 2023
2 parents 775330e + cc07c68 commit df914e1
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Source/ARTRealtimeChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -1050,16 +1050,6 @@ - (void)attachAfterChecks:(ARTCallback)callback channelSerial:(NSString *)channe
[self setSuspended:metadata];
}] startTimer];
} ackCallback:nil];

if (![self.realtime shouldQueueEvents]) {
ARTEventListener *reconnectedListener = [self.realtime.connectedEventEmitter once:^(NSNull *n) {
// Disconnected and connected while attaching, re-attach.
[self attachAfterChecks:callback channelSerial:channelSerial];
}];
[_attachedEventEmitter once:^(ARTErrorInfo *err) {
[self.realtime.connectedEventEmitter off:reconnectedListener];
}];
}
}

- (void)detach:(ARTCallback)callback {
Expand Down

0 comments on commit df914e1

Please sign in to comment.