Chromium Code Reviews| Index: sdk/lib/async/stream_impl.dart |
| diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart |
| index bbfc98ebb90661fd96348873c1ae0f6a34ced1ae..7d59cc7ed7420d3f95387ec579b42d3242ccd899 100644 |
| --- a/sdk/lib/async/stream_impl.dart |
| +++ b/sdk/lib/async/stream_impl.dart |
| @@ -123,7 +123,7 @@ abstract class _StreamImpl<T> extends Stream<T> { |
| * should be the last message sent. |
| */ |
| void _close() { |
| - if (_isClosed) throw new StateError("Sending on closed stream"); |
| + if (_isClosed) return; |
|
Mads Ager (google)
2013/02/21 10:39:02
We should land this file on bleeding_edge. It is a
Søren Gjesse
2013/02/21 11:44:25
Anders did.
|
| _state |= _STREAM_CLOSED; |
| if (!_canFireEvent) { |
| // You can't enqueue an event after the Done, so make it const. |
| @@ -310,6 +310,8 @@ abstract class _StreamImpl<T> extends Stream<T> { |
| * |
| * If an event is currently firing, the cancel is delayed |
| * until after the subscribers have received the event. |
| + * |
| + * This will also close the stream. |
| */ |
| void _cancel(_StreamSubscriptionImpl subscriber); |