mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
cancel open subscription (#5824)
fixes https://github.com/flutter/flutter/issues/5788
This commit is contained in:
parent
4ea8f302ab
commit
678da3ac2b
@ -38,7 +38,7 @@ linter:
|
||||
# === error rules ===
|
||||
- avoid_empty_else
|
||||
# - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153
|
||||
# - cancel_subscriptions # https://github.com/flutter/flutter/issues/5788
|
||||
- cancel_subscriptions
|
||||
# - close_sinks # https://github.com/flutter/flutter/issues/5789
|
||||
- control_flow_in_finally
|
||||
- empty_statements
|
||||
|
||||
@ -39,7 +39,7 @@ linter:
|
||||
# === error rules ===
|
||||
- avoid_empty_else
|
||||
# - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153
|
||||
# - cancel_subscriptions # https://github.com/flutter/flutter/issues/5788
|
||||
- cancel_subscriptions
|
||||
# - close_sinks # https://github.com/flutter/flutter/issues/5789
|
||||
- control_flow_in_finally
|
||||
- empty_statements
|
||||
|
||||
@ -78,6 +78,7 @@ Future<int> runCommandAndStreamOutput(List<String> cmd, {
|
||||
// Wait for stdout to be fully processed
|
||||
// because process.exitCode may complete first causing flaky tests.
|
||||
await subscription.asFuture();
|
||||
subscription.cancel();
|
||||
|
||||
return await process.exitCode;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user