mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 09:27:55 +01:00
29 lines
510 B
Objective-C
29 lines
510 B
Objective-C
#import "TGActor.h"
|
|
|
|
#import "TGTelegraph.h"
|
|
|
|
@implementation TGActor
|
|
|
|
- (void)cancel
|
|
{
|
|
if (self.cancelToken != nil)
|
|
{
|
|
[TGTelegraphInstance cancelRequestByToken:self.cancelToken];
|
|
self.cancelToken = nil;
|
|
}
|
|
|
|
if (self.multipleCancelTokens != nil)
|
|
{
|
|
for (id token in self.multipleCancelTokens)
|
|
{
|
|
[TGTelegraphInstance cancelRequestByToken:token];
|
|
}
|
|
|
|
self.multipleCancelTokens = nil;
|
|
}
|
|
|
|
[super cancel];
|
|
}
|
|
|
|
@end
|