Commit 678da3ac authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

cancel open subscription (#5824)

fixes https://github.com/flutter/flutter/issues/5788
parent 4ea8f302
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment