summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-07-27 10:43:22 -0400
committerJoel Fischer <joeljfischer@gmail.com>2017-07-27 10:43:22 -0400
commitbf77775cb702d2275584cd92b7f75e57c70abe79 (patch)
treefad2cdde92d7385d2ea5baadc3f08553c5b3dd57
parent63f9f35b15d2fb58ff64fd65469404ed002e8630 (diff)
parentc93b483a98054558516986b2d3c4f3538d72d95d (diff)
downloadsdl_ios-bf77775cb702d2275584cd92b7f75e57c70abe79.tar.gz
Merge branch 'bugfix/issue_648' of https://github.com/davidswi/sdl_ios into davidswi-bugfix/issue_648
-rw-r--r--SmartDeviceLink/SDLIAPTransport.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m
index a4f2d59cf..3386a298a 100644
--- a/SmartDeviceLink/SDLIAPTransport.m
+++ b/SmartDeviceLink/SDLIAPTransport.m
@@ -171,9 +171,13 @@ int const streamOpenTimeoutSeconds = 2;
// Stop event listening here so that even if the transport is disconnected by the proxy
// we unregister for accessory local notifications
[self sdl_stopEventListening];
- // Only disconnect the data session, the control session does not stay open and is handled separately
- if (self.session != nil) {
+ if (self.controlSession != nil) {
+ [self.controlSession stop];
+ self.controlSession.streamDelegate = nil;
+ self.controlSession = nil;
+ } else if (self.session != nil) {
[self.session stop];
+ self.session.streamDelegate = nil;
self.session = nil;
}
}