Skip new launch when the previous one is still pending (#2347)
Fixes #2346 Co-authored-by: LoveSy <shana@zju.edu.cn>
This commit is contained in:
parent
5666dca1e3
commit
5ea3db130c
|
|
@ -262,6 +262,11 @@ public class LSPManagerService extends ILSPManagerService.Stub {
|
|||
// there's one running parasitic manager
|
||||
// or it's run by ourself after killing, resume it
|
||||
return true;
|
||||
} else if (pendingManager) {
|
||||
// Check the flag in case new launch comes before finishing
|
||||
// the previous one to avoid racing.
|
||||
Log.d(TAG, "manager is still on its way when new launch comes, skipping");
|
||||
return false;
|
||||
} else {
|
||||
// new parasitic manager launch, set the flag and kill
|
||||
// old processes
|
||||
|
|
|
|||
Loading…
Reference in New Issue