Skip to content

Commit

Permalink
Add log messages to help understand #1782
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-forooghian committed Jul 5, 2023
1 parent dcc540f commit 6f738c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/ARTRealtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,11 @@ - (ARTEventListener *)performTransitionWithStateChange:(ARTConnectionStateChange
[self closeAndReleaseTransport];
if (!_connectionLostAt) {
_connectionLostAt = [NSDate date];
ARTLogVerbose(self.logger, @"RT:%p set connection lost time; expected suspension at %@ (ttl=%f)", self, [self suspensionTime], self.connectionStateTtl);
NSISO8601DateFormatter *const formatter = [[NSISO8601DateFormatter alloc] init];
if (@available(macOS 10.13, *)) {
formatter.formatOptions |= NSISO8601DateFormatWithFractionalSeconds;
}
ARTLogVerbose(self.logger, @"RT:%p set connection lost time; expected suspension at %@ (ttl=%f)", self, [formatter stringFromDate:[self suspensionTime]], self.connectionStateTtl);
}

NSTimeInterval retryDelay;
Expand Down Expand Up @@ -1092,6 +1096,7 @@ - (void)transportConnectForcingNewToken:(BOOL)forceNewToken newConnection:(BOOL)
[self.auth setTokenDetails:nil];

// Schedule timeout handler
ARTLogVerbose(self.logger, @"Scheduling timeout work in transportConnectForcingNewToken:newConnection:");
_authenitcatingTimeoutWork = artDispatchScheduled(self.options.testOptions.realtimeRequestTimeout, _rest.queue, ^{
[self onConnectionTimeOut];
});
Expand Down

0 comments on commit 6f738c5

Please sign in to comment.