Index: utils/pub/error_group.dart |
diff --git a/utils/pub/error_group.dart b/utils/pub/error_group.dart |
index dc0ba8a7fce1ef46e5212b5eb8051c80d58c1775..5e6baf859f51da72e6fbd29cb3a6cc02441fc689 100644 |
--- a/utils/pub/error_group.dart |
+++ b/utils/pub/error_group.dart |
@@ -232,10 +232,6 @@ class _ErrorGroupStream extends Stream { |
/// Whether [this] has any listeners. |
bool get _hasListeners => _controller.hasSubscribers; |
- // TODO(nweiz): Remove this when issue 8512 is fixed. |
- /// Whether the subscription has been cancelled. |
- bool _cancelled = false; |
- |
/// Creates a new [_ErrorGroupFuture] that's a child of [_group] and wraps |
/// [inner]. |
_ErrorGroupStream(this._group, Stream inner) |
@@ -243,15 +239,13 @@ class _ErrorGroupStream extends Stream { |
new StreamController.broadcast() : |
new StreamController() { |
_subscription = inner.listen((v) { |
- if (!_cancelled) _controller.add(v); |
+ _controller.add(v); |
}, onError: (e) { |
- if (!_cancelled) _group._signalError(e); |
+ _group._signalError(e); |
}, onDone: () { |
- if (!_cancelled) { |
- _isDone = true; |
- _group._signalStreamComplete(this); |
- _controller.close(); |
- } |
+ _isDone = true; |
+ _group._signalStreamComplete(this); |
+ _controller.close(); |
}); |
} |
@@ -268,7 +262,6 @@ class _ErrorGroupStream extends Stream { |
/// unless it's already complete. |
void _signalError(AsyncError e) { |
if (_isDone) return; |
- _cancelled = true; |
_subscription.cancel(); |
// Call these asynchronously to work around issue 7913. |
defer(() { |