Do not process a command from the terminal if we are still processing a command (#6966)
This commit is contained in:
@@ -163,10 +163,21 @@ abstract class ResidentRunner {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool _processingTerminalRequest = false;
|
||||
|
||||
Future<Null> processTerminalInput(String command) async {
|
||||
bool handled = await _commonTerminalInputHandler(command);
|
||||
if (!handled)
|
||||
await handleTerminalCommand(command);
|
||||
if (_processingTerminalRequest) {
|
||||
printTrace('Ignoring terminal input: "$command" because we are busy.');
|
||||
return;
|
||||
}
|
||||
_processingTerminalRequest = true;
|
||||
try {
|
||||
bool handled = await _commonTerminalInputHandler(command);
|
||||
if (!handled)
|
||||
await handleTerminalCommand(command);
|
||||
} finally {
|
||||
_processingTerminalRequest = false;
|
||||
}
|
||||
}
|
||||
|
||||
void appFinished() {
|
||||
|
||||
Reference in New Issue
Block a user