Skip to content

Commit

Permalink
Fix: potential crash after closing app with non-zero exit
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Aug 27, 2024
1 parent b4e4455 commit 1bd2990
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions Natives/PLLogOutputView.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ - (void)actionStartStopLogOutput {
- (void)actionToggleLogOutput {
if (fatalErrorOccurred) {
[UIApplication.sharedApplication performSelector:@selector(suspend)];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 200 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
dispatch_group_leave(fatalExitGroup);
fatalExitGroup = nil;
});
dispatch_group_leave(fatalExitGroup);
return;
}

Expand Down
1 change: 0 additions & 1 deletion Natives/SurfaceViewController+Navigation.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ - (void)actionForceClose {
exit(0);
} else {
dispatch_group_leave(fatalExitGroup);
fatalExitGroup = nil;
}
}];
}];
Expand Down

0 comments on commit 1bd2990

Please sign in to comment.