Skip to content

Commit

Permalink
Removed unnecessary re-attach attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Nov 5, 2023
1 parent 65349da commit cc07c68
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 cc07c68

Please sign in to comment.