Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix App does not automatically reconnect to HU after changing language #1590

Merged
merged 2 commits into from Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions SmartDeviceLink/SDLLifecycleManager.m
Expand Up @@ -262,6 +262,7 @@ - (void)didEnterStateReconnecting {
- (void)sdl_stopManager:(BOOL)shouldRestart {
SDLLogV(@"Stopping manager, %@", (shouldRestart ? @"will restart" : @"will not restart"));

[self.proxy disconnectSession];
self.proxy = nil;

[self.fileManager stop];
Expand Down
3 changes: 3 additions & 0 deletions SmartDeviceLink/SDLProxy.h
Expand Up @@ -133,6 +133,9 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)putFileStream:(NSInputStream *)inputStream withRequest:(SDLPutFile *)putFileRPCRequest;

/// Disconnects the current app session, including the security manager and primary transport.
- (void)disconnectSession;

@end

NS_ASSUME_NONNULL_END
6 changes: 5 additions & 1 deletion SmartDeviceLink/SDLProxy.m
Expand Up @@ -174,7 +174,8 @@ + (SDLProxy *)tcpProxyWithListener:(id<SDLProxyListener>)delegate tcpIPAddress:(
return ret;
}

- (void)dealloc {
- (void)disconnectSession {
SDLLogD(@"Disconnecting the proxy; stopping security manager and primary transport.");
if (self.protocol.securityManager != nil) {
[self.protocol.securityManager stop];
}
Expand All @@ -186,6 +187,9 @@ - (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];

[_urlSession invalidateAndCancel];
}

- (void)dealloc {
SDLLogV(@"Proxy dealloc");
}

Expand Down