| Index: sdk/lib/io/io_sink.dart
|
| diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart
|
| index d9f2e5f8cce574268633263fa5debca8ad87050a..bae95792db6edafc5d70b7833865b6a8a0eb612b 100644
|
| --- a/sdk/lib/io/io_sink.dart
|
| +++ b/sdk/lib/io/io_sink.dart
|
| @@ -15,7 +15,8 @@ part of dart.io;
|
| * While a stream is being added using [addStream], any further attempts
|
| * to add or write to the [IOSink] will fail until the [addStream] completes.
|
| *
|
| - * It is an error to add data to the [IOSink] after the sink is closed.
|
| + * If data is added to the [IOSink] after the sink is closed, the data will be
|
| + * ignored. Use the [done] future to be notified when the [IOSink] is closed.
|
| */
|
| abstract class IOSink implements StreamSink<List<int>>, StringSink {
|
| /**
|
| @@ -147,12 +148,11 @@ class _StreamSinkImpl<T> implements StreamSink<T> {
|
| _StreamSinkImpl(this._target);
|
|
|
| void add(T data) {
|
| - if (_isClosed) throw new StateError("StreamSink is closed");
|
| + if (_isClosed) return;
|
| _controller.add(data);
|
| }
|
|
|
| void addError(error, [StackTrace stackTrace]) {
|
| - if (_isClosed) throw new StateError("StreamSink is closed");
|
| _controller.addError(error, stackTrace);
|
| }
|
|
|
|
|