cleanup unawaited futures lints (#5945)
This commit is contained in:
parent
869371fc3e
commit
d65460e7a5
@ -83,7 +83,7 @@ class _TaskRunner {
|
|||||||
} on TimeoutException catch (_) {
|
} on TimeoutException catch (_) {
|
||||||
return new TaskResult.failure('Task timed out after $taskTimeout');
|
return new TaskResult.failure('Task timed out after $taskTimeout');
|
||||||
} finally {
|
} finally {
|
||||||
forceQuitRunningProcesses();
|
await forceQuitRunningProcesses();
|
||||||
_closeKeepAlivePort();
|
_closeKeepAlivePort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ Future<Map<String, dynamic>> runTask(String taskName) async {
|
|||||||
|
|
||||||
bool runnerFinished = false;
|
bool runnerFinished = false;
|
||||||
|
|
||||||
|
// ignore: unawaited_futures
|
||||||
runner.exitCode.then((_) {
|
runner.exitCode.then((_) {
|
||||||
runnerFinished = true;
|
runnerFinished = true;
|
||||||
});
|
});
|
||||||
|
@ -166,6 +166,7 @@ Future<Process> startProcess(String executable, List<String> arguments,
|
|||||||
ProcessInfo procInfo = new ProcessInfo(command, proc);
|
ProcessInfo procInfo = new ProcessInfo(command, proc);
|
||||||
_runningProcesses.add(procInfo);
|
_runningProcesses.add(procInfo);
|
||||||
|
|
||||||
|
// ignore: unawaited_futures
|
||||||
proc.exitCode.then((_) {
|
proc.exitCode.then((_) {
|
||||||
_runningProcesses.remove(procInfo);
|
_runningProcesses.remove(procInfo);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user