diff options
author | NicoleYarroch <nicole@livio.io> | 2020-10-07 15:31:27 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2020-10-07 15:31:27 -0400 |
commit | 97dc66cde0e05ea50cf3650b33ef091e6b532909 (patch) | |
tree | 011b099b366f1e682b76d490ea9cb7b07d92b1d8 | |
parent | 3158a449d003d92fc206b500f6ec53349b347ed6 (diff) | |
download | sdl_ios-bugfix/issue_1795_start_session_ack_failure.tar.gz |
Added docs and logsbugfix/issue_1795_start_session_ack_failure
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r-- | SmartDeviceLink/private/SDLLifecycleProtocolHandler.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m b/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m index 2732aac06..384af7d86 100644 --- a/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m +++ b/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m @@ -82,16 +82,14 @@ NS_ASSUME_NONNULL_BEGIN [self sdl_sendStartServiceSession:self.rpcStartServiceRetryCounter]; } -/// TODO +/// Sends the RPC start service request to the module and sets a timer to wait for a response from the module. If the module ACKs or NAKs the request, then the timer is canceled. However, if the module does not respond within a set amount of time, the RPC start service is resent. Once the max number of retry accounts has been reached the session is closed. /// @param retryCount The retry attempt count - (void)sdl_sendStartServiceSession:(int)retryCount { if (retryCount > RPCStartServiceRetries) { - SDLLogE(@"Starting the RPC service failed %d times. Closing the session", RPCStartServiceRetries); + SDLLogE(@"Retrying sending the RPC start service failed %d times. Closing the session", RPCStartServiceRetries); return [self.protocol stopWithCompletionHandler:^{}]; } - SDLLogD(@"Starting timeout timer for the module's response to the RPC start service"); - SDLControlFramePayloadRPCStartService *startServicePayload = [[SDLControlFramePayloadRPCStartService alloc] initWithVersion:SDLMaxProxyProtocolVersion]; [self.protocol startServiceWithType:SDLServiceTypeRPC payload:startServicePayload.data]; @@ -104,10 +102,11 @@ NS_ASSUME_NONNULL_BEGIN __weak typeof(self) weakSelf = self; self.rpcStartServiceTimeoutTimer.elapsedBlock = ^{ weakSelf.rpcStartServiceRetryCounter += 1; - SDLLogE(@"Module did not respond to the RPC start service within %.f seconds. Retrying (#%d) sending the request.", StartSessionTime, weakSelf.rpcStartServiceRetryCounter); + SDLLogE(@"Module did not respond to the RPC start service within %.f seconds. Retrying sending the RPC start service (#%d)", StartSessionTime, weakSelf.rpcStartServiceRetryCounter); [weakSelf sdl_sendStartServiceSession:weakSelf.rpcStartServiceRetryCounter]; }; + SDLLogD(@"Starting timeout timer for the module's response to the RPC start service"); [self.rpcStartServiceTimeoutTimer start]; } |