iOS:fix NSTimer invalidate in main queue
This commit is contained in:
parent
9863c8bbf8
commit
c51fc83537
@ -144,8 +144,10 @@ - (void)initJSExecutor {
|
||||
__strong typeof(_self) self = _self;
|
||||
NSTimer *timer = [self.timers valueForKey:timerId];
|
||||
if (timer) {
|
||||
[timer invalidate];
|
||||
[self.timers removeObjectForKey:timerId];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[timer invalidate];
|
||||
});
|
||||
}
|
||||
}];
|
||||
|
||||
|
Reference in New Issue
Block a user