Revert "attempt to fix expired key for mtproto"

This reverts commit d08dcacfdac8ed8097671d4e7ac3387e67bcb8f2.
This commit is contained in:
Ilya Laktyushin 2024-07-09 18:11:30 +04:00
parent 75d6f07a57
commit ec074f650d
4 changed files with 3 additions and 17 deletions

View File

@ -6,5 +6,4 @@
- (instancetype)initWithPersistentKey:(MTDatacenterAuthKey *)persistentKey ephemeralKey:(MTDatacenterAuthKey *)ephemeralKey completion:(void (^)(bool))completion;
-(void)complete;
@end

View File

@ -168,8 +168,4 @@
}
}
-(void)complete {
_completion(true);
}
@end

View File

@ -250,7 +250,7 @@ static int32_t fixedTimeDifferenceValue = 0;
_tempKeyExpiration = 24 * 60 * 60;
#if DEBUG
_tempKeyExpiration = 30;
//_tempKeyExpiration = 30;
#endif
_datacenterSeedAddressSetById = [[NSMutableDictionary alloc] init];

View File

@ -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;