Commit b40b54e3 authored by John McCutchan's avatar John McCutchan Committed by GitHub

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

parent c1a3100e
...@@ -163,10 +163,21 @@ abstract class ResidentRunner { ...@@ -163,10 +163,21 @@ abstract class ResidentRunner {
return false; return false;
} }
bool _processingTerminalRequest = false;
Future<Null> processTerminalInput(String command) async { Future<Null> processTerminalInput(String command) async {
bool handled = await _commonTerminalInputHandler(command); if (_processingTerminalRequest) {
if (!handled) printTrace('Ignoring terminal input: "$command" because we are busy.');
await handleTerminalCommand(command); return;
}
_processingTerminalRequest = true;
try {
bool handled = await _commonTerminalInputHandler(command);
if (!handled)
await handleTerminalCommand(command);
} finally {
_processingTerminalRequest = false;
}
} }
void appFinished() { void appFinished() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment