cleanup unawaited futures lints (#5946)

This commit is contained in:
Dan Rubel
2016-09-20 07:33:35 -04:00
committed by GitHub
parent d65460e7a5
commit 3c467a899a

View File

@@ -175,7 +175,7 @@ class FlutterDriver {
// At this point the service extension must be installed. Verify it.
Health health = await driver.checkHealth();
if (health.status != HealthStatus.ok) {
client.close();
await client.close();
throw new DriverError('Flutter application health check failed.');
}
@@ -371,11 +371,8 @@ Future<VMServiceClientConnection> _waitAndConnect(String url) async {
new rpc.Peer(new IOWebSocketChannel(ws2).cast())..listen()
);
} catch(e) {
if (ws1 != null)
ws1.close();
if (ws2 != null)
ws2.close();
await ws1?.close();
await ws2?.close();
if (timer.elapsed < const Duration(seconds: 30)) {
_log.info('Waiting for application to start');