Skip to content

Commit eea6197

Browse files
authored
Perform exit from server, not starter as awaiting from starter causes hanging in incremental compilation scenario. (flutter#4955)
1 parent 3cc6c67 commit eea6197

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

frontend_server/bin/starter.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
library frontend_server;
22

3-
import 'dart:async';
4-
import 'dart:io';
5-
63
import 'package:frontend_server/server.dart';
74

8-
Future<Null> main(List<String> args) async {
9-
exit(await starter(args));
5+
void main(List<String> args){
6+
starter(args);
107
}

frontend_server/lib/server.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ Future<int> starter(
104104
compiler ??= new _FlutterFrontendCompiler(output, trackWidgetCreation: options['track-widget-creation']);
105105

106106
if (options.rest.isNotEmpty) {
107-
return await compiler.compile(options.rest[0], options)
107+
exit(await compiler.compile(options.rest[0], options)
108108
? 0
109-
: 254;
109+
: 254);
110110
}
111111

112112
frontend.listenAndCompile(compiler, input ?? stdin, options, () { exit(0); } );

0 commit comments

Comments
 (0)