summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-04-15 15:54:36 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-04-15 15:54:36 -0400
commit4fbd66c201a032e086169f50eb032d2834f9d8a3 (patch)
treeba2321287fd4d6b90dca2077d2d4a36e56ce5845
parent6ce0eae0a9a73e9cbd535c3d49c29352e6494ba1 (diff)
downloadsdl_ios-4fbd66c201a032e086169f50eb032d2834f9d8a3.tar.gz
-rw-r--r--Example Apps/Example ObjC/ProxyManager.m9
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift6
2 files changed, 2 insertions, 13 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m
index a510c79ee..03ebd5151 100644
--- a/Example Apps/Example ObjC/ProxyManager.m
+++ b/Example Apps/Example ObjC/ProxyManager.m
@@ -76,12 +76,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)reset {
- if (self.sdlManager == nil) {
- [self sdlex_updateProxyState:ProxyStateStopped];
- return;
- }
-
[self.sdlManager stop];
+ [self sdlex_updateProxyState:ProxyStateStopped];
}
- (void)sdlex_updateProxyState:(ProxyState)newState {
@@ -97,9 +93,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startWithProxyTransportType:(ProxyTransportType)proxyTransportType {
[self sdlex_updateProxyState:ProxyStateSearchingForConnection];
- // Check for previous instance of sdlManager
- if (self.sdlManager) { return; }
-
SDLLifecycleConfiguration *lifecycleConfig = proxyTransportType == ProxyTransportTypeIAP ? [self.class sdlex_iapLifecycleConfiguration] : [self.class sdlex_tcpLifecycleConfiguration];
[self sdlex_setupConfigurationWithLifecycleConfiguration:lifecycleConfig];
}
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index 3b0ca25a4..85f33bf53 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -50,12 +50,8 @@ extension ProxyManager {
/// Attempts to close the connection between the this app and the car's head unit. The `SDLManagerDelegate`'s `managerDidDisconnect()` is called when connection is actually closed.
func resetConnection() {
- guard sdlManager != nil else {
- delegate?.didChangeProxyState(ProxyState.stopped)
- return
- }
-
sdlManager.stop()
+ delegate?.didChangeProxyState(ProxyState.stopped)
}
}