Skip to content

Commit

Permalink
Fix suspended reattach
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira committed Oct 27, 2019
1 parent 6a39c5a commit 306fe56
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/ARTRealtimeChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -989,10 +989,12 @@ - (void)setSuspended:(ARTStatus *)status retryIn:(NSTimeInterval)retryTimeout {
[self failQueuedMessages:status];
[self transition:ARTRealtimeChannelSuspended status:status];
[[self unlessStateChangesBefore:retryTimeout do:^{
[self.realtime.logger debug:__FILE__ line:__LINE__ message:@"RT:%p C:%p (%@) reattach initiated by retry timeout", _realtime, self, self.name];
[self.realtime.logger debug:__FILE__ line:__LINE__ message:@"RT:%p C:%p (%@) reattach initiated by retry timeout", self->_realtime, self, self.name];
[self reattachWithReason:nil callback:^(ARTErrorInfo *errorInfo) {
ARTStatus *status = [ARTStatus state:ARTStateError info:errorInfo];
[self setSuspended:status];
if (errorInfo) {
ARTStatus *status = [ARTStatus state:ARTStateError info:errorInfo];
[self setSuspended:status];
}
}];
}] startTimer];
} ART_TRY_OR_MOVE_TO_FAILED_END
Expand Down

0 comments on commit 306fe56

Please sign in to comment.