mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Revert "attempt to fix expired key for mtproto"
This reverts commit d08dcacfda.
This commit is contained in:
parent
75d6f07a57
commit
ec074f650d
4 changed files with 3 additions and 17 deletions
|
|
@ -6,5 +6,4 @@
|
|||
|
||||
- (instancetype)initWithPersistentKey:(MTDatacenterAuthKey *)persistentKey ephemeralKey:(MTDatacenterAuthKey *)ephemeralKey completion:(void (^)(bool))completion;
|
||||
|
||||
-(void)complete;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -168,8 +168,4 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(void)complete {
|
||||
_completion(true);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ static int32_t fixedTimeDifferenceValue = 0;
|
|||
_tempKeyExpiration = 24 * 60 * 60;
|
||||
|
||||
#if DEBUG
|
||||
_tempKeyExpiration = 30;
|
||||
//_tempKeyExpiration = 30;
|
||||
#endif
|
||||
|
||||
_datacenterSeedAddressSetById = [[NSMutableDictionary alloc] init];
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#import <MtProtoKit/MTSignal.h>
|
||||
#import <MtProtoKit/MTQueue.h>
|
||||
#import <MtProtoKit/MTBindKeyMessageService.h>
|
||||
|
||||
typedef enum {
|
||||
MTProtoStateAwaitingDatacenterScheme = 1,
|
||||
MTProtoStateAwaitingDatacenterAuthorization = 2,
|
||||
|
|
@ -885,7 +885,7 @@ static const NSUInteger MTMaxUnacknowledgedMessageCount = 64;
|
|||
|
||||
- (MTDatacenterAuthKey *)getAuthKeyForCurrentScheme:(MTTransportScheme *)scheme createIfNeeded:(bool)createIfNeeded authInfoSelector:(MTDatacenterAuthInfoSelector *)authInfoSelector {
|
||||
if (_useExplicitAuthKey) {
|
||||
MTDatacenterAuthInfoSelector selector = scheme.media ? MTDatacenterAuthInfoSelectorEphemeralMedia : MTDatacenterAuthInfoSelectorEphemeralMain;
|
||||
MTDatacenterAuthInfoSelector selector = MTDatacenterAuthInfoSelectorEphemeralMain;
|
||||
if (authInfoSelector != nil) {
|
||||
*authInfoSelector = selector;
|
||||
}
|
||||
|
|
@ -2151,15 +2151,6 @@ static NSString *dumpHexString(NSData *data, int maxLength) {
|
|||
}
|
||||
|
||||
if (_useExplicitAuthKey != nil) {
|
||||
if (scheme.media) {
|
||||
for (NSInteger i = (NSInteger)_messageServices.count - 1; i >= 0; i--)
|
||||
{
|
||||
MTBindKeyMessageService* messageService = (MTBindKeyMessageService *)_messageServices[(NSUInteger)i];
|
||||
if ([messageService respondsToSelector:@selector(complete)]) {
|
||||
[messageService complete];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (_cdn) {
|
||||
_validAuthInfo = nil;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue