diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-04-12 11:10:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 11:10:00 -0400 |
commit | 6ce0eae0a9a73e9cbd535c3d49c29352e6494ba1 (patch) | |
tree | 4308c598be4aaeed6671ae2023d1dc2974d0e474 | |
parent | 0331f40bba320ef1f1f16094683e1bca3f79b949 (diff) | |
parent | bf5257fe18bad7300386a26528e77e7498b05f3a (diff) | |
download | sdl_ios-6ce0eae0a9a73e9cbd535c3d49c29352e6494ba1.tar.gz |
Merge pull request #1232 from smartdevicelink/bugfix/issue-1097-OnAppInterfaceUnregistered-Reconnecting
Fixing issue that caused SDLTransportDidDisconnect to get called befo…
-rw-r--r-- | SmartDeviceLink/SDLProxy.m | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m index 49788793a..8f570aab8 100644 --- a/SmartDeviceLink/SDLProxy.m +++ b/SmartDeviceLink/SDLProxy.m @@ -403,9 +403,6 @@ static float DefaultConnectionTimeout = 45.0; SDLLogV(@"Message received: %@", newMessage); // Intercept and handle several messages ourselves - if ([functionName isEqualToString:SDLRPCFunctionNameOnAppInterfaceUnregistered] || [functionName isEqualToString:SDLRPCFunctionNameUnregisterAppInterface]) { - [self handleRPCUnregistered:dict]; - } if ([functionName isEqualToString:@"RegisterAppInterfaceResponse"]) { [self handleRegisterAppInterfaceResponse:(SDLRPCResponse *)newMessage]; @@ -447,6 +444,11 @@ static float DefaultConnectionTimeout = 45.0; } [self sdl_invokeDelegateMethodsWithFunction:functionName message:newMessage]; + + //Intercepting SDLRPCFunctionNameOnAppInterfaceUnregistered must happen after it is broadcasted as a notification above. This will prevent reconnection attempts in the lifecycle manager when the AppInterfaceUnregisteredReason should prevent reconnections. + if ([functionName isEqualToString:SDLRPCFunctionNameOnAppInterfaceUnregistered] || [functionName isEqualToString:SDLRPCFunctionNameUnregisterAppInterface]) { + [self handleRPCUnregistered:dict]; + } // When an OnHMIStatus notification comes in, after passing it on (above), generate an "OnLockScreenNotification" if ([functionName isEqualToString:@"OnHMIStatus"]) { |