summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLTCPTransport.m
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-05-18 12:54:53 -0400
committerNicoleYarroch <nicole@livio.io>2020-05-18 12:54:53 -0400
commit60a3de52f63576675252b050c3aab8c3ac7cbd04 (patch)
tree0572b4b9626258b3040ea6224155b9db23d8076a /SmartDeviceLink/SDLTCPTransport.m
parentd4566f10acd2a8f6cc0f5cb2c5cba9b6836dd091 (diff)
downloadsdl_ios-60a3de52f63576675252b050c3aab8c3ac7cbd04.tar.gz
Fixed where handler is saved
Diffstat (limited to 'SmartDeviceLink/SDLTCPTransport.m')
-rw-r--r--SmartDeviceLink/SDLTCPTransport.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink/SDLTCPTransport.m
index e024d2558..2b57f1d56 100644
--- a/SmartDeviceLink/SDLTCPTransport.m
+++ b/SmartDeviceLink/SDLTCPTransport.m
@@ -97,7 +97,6 @@ NSTimeInterval ConnectionTimeoutSecs = 30.0;
}
- (void)disconnectWithCompletionHandler:(void (^)(void))disconnectCompletionHandler {
- self.disconnectCompletionHandler = disconnectCompletionHandler;
SDLLogD(@"Disconnecting");
[self.sendDataQueue removeAllObjects];
@@ -109,6 +108,8 @@ NSTimeInterval ConnectionTimeoutSecs = 30.0;
return disconnectCompletionHandler();
}
+ self.disconnectCompletionHandler = disconnectCompletionHandler;
+
// Attempt to cancel the `ioThread`. Once the thread realizes it has been cancelled, it will cleanup the input/output streams.
[self sdl_cancelIOThread];
}