Index: sdk/lib/async/stream_pipe.dart |
diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart |
index 58acd4f8b47b23e5fdfbf55e2038515452bf9564..643d14227afca6b41cda51b7ede42bbf8ae8b465 100644 |
--- a/sdk/lib/async/stream_pipe.dart |
+++ b/sdk/lib/async/stream_pipe.dart |
@@ -327,6 +327,7 @@ class _TakeStream<T> extends _ForwardingStream<T, T> { |
void onDone(), |
bool cancelOnError) { |
if (_count == 0) { |
+ _source.listen(null).cancel(); |
return new _DoneStreamSubscription<T>(onDone); |
} |
return new _StateStreamSubscription<T>( |