Disconnect and forget signaling configuration on logout.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2018-09-21 15:17:39 +02:00
Родитель 6249fd6868
Коммит c53d122b6e
3 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -24,5 +24,6 @@ extern NSString * const NCESReceivedParticipantListMessageNotification;
- (void)leaveRoom:(NSString *)roomId;
- (void)sendCallMessage:(NCSignalingMessage *)message;
- (void)requestOfferForSessionId:(NSString *)sessionId andRoomType:(NSString *)roomType;
- (void)disconnect;
@end

Просмотреть файл

@ -116,6 +116,13 @@ NSString * const NCESReceivedParticipantListMessageNotification = @"NCESReceived
[self setReconnectionTimer];
}
- (void)disconnect
{
[self invalidateReconnectionTimer];
[_webSocket close];
_webSocket = nil;
}
- (void)setReconnectionTimer
{
[self invalidateReconnectionTimer];

Просмотреть файл

@ -102,6 +102,7 @@ NSString * const NCServerCapabilitiesReceivedNotification = @"NCServerCapabiliti
_ncDeviceIdentifier = nil;
_ncDeviceSignature = nil;
_defaultBrowser = nil;
_ncSignalingConfiguration = nil;
[_keychain removeItemForKey:kNCServerKey];
[_keychain removeItemForKey:kNCUserKey];
@ -156,7 +157,7 @@ NSString * const NCServerCapabilitiesReceivedNotification = @"NCServerCapabiliti
}
}];
}
[[NCExternalSignalingController sharedInstance] disconnect];
[[NCSettingsController sharedInstance] cleanUserAndServerStoredValues];
if (block) block(nil);
}