Do not process a command from the terminal if we are still processing a command (#6966)

This commit is contained in:
John McCutchan
2016-11-21 14:09:37 -08:00
committed by GitHub
parent c1a3100e4c
commit b40b54e301

View File

@@ -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() {