Skip to content

Commit

Permalink
Merge pull request #99 from jonsamwell/close-driver-error-fix
Browse files Browse the repository at this point in the history
Close driver error fix
  • Loading branch information
jonsamwell authored Nov 24, 2020
2 parents 32e41e7 + d73d932 commit 956b2c2
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions lib/src/flutter/flutter_world.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,13 @@ class FlutterWorld extends World {
}) async {
try {
if (_driver != null) {
await _driver
.waitUntilNoTransientCallbacks(timeout: timeout)
.catchError((e, st) {
// Avoid an unhandled error.
print(
'Error waiting for no transient callbacks from Flutter driver:\n\n`$e`\n\n$st');
});

await _driver.close().catchError((e, st) {
// Avoid an unhandled error.
print('Error closing Flutter driver:\n\n`$e`\n\n$st');
});
await _driver.close().catchError(
(e, st) {
// Avoid an unhandled error
return null;
},
);
}
} catch (e, st) {
print('Error closing Flutter driver:\n\n`$e`\n\n$st');
} finally {
_driver = null;
}
Expand Down

0 comments on commit 956b2c2

Please sign in to comment.