fix async exiting

This commit is contained in:
fuwa
2019-07-25 10:58:19 +08:00
parent 628cfa07b6
commit 465ffc5c90
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -157,8 +157,8 @@ class _CyberWOW_PageState extends State<CyberWOW_Page> with WidgetsBindingObserv
(s) => validState = false,
(s) => s.next(),
(s) => s.next(),
(s) {
s.wait();
(s) async {
await s.wait();
log.finer('exit state wait done');
exited = true;
}
+3 -3
View File
@@ -383,11 +383,11 @@ class ExitingState extends HookedState {
}
Future<SyncedState> wait() async {
log.fine("Exiting wait");
log.finer("Exiting wait");
Future<void> printStdout() async {
await for (final line in processOutput) {
log.info('exiting: print stdout loop');
log.finer('exiting: print stdout loop');
append(line);
log.info(line);
@@ -396,6 +396,6 @@ class ExitingState extends HookedState {
await printStdout();
log.info('exiting state done');
log.finer('exiting state done');
}
}