| Index: sdk/lib/async/stream_pipe.dart
|
| diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart
|
| index 69210ecabd1f2259571bfe6db85f32fc8942bd19..f3a8ea119ecbfdeb6d8294034ffc0648c835f7da 100644
|
| --- a/sdk/lib/async/stream_pipe.dart
|
| +++ b/sdk/lib/async/stream_pipe.dart
|
| @@ -158,25 +158,20 @@ class _ForwardingStreamSubscription<S, T>
|
| // StreamSubscription interface.
|
|
|
| void pause([Future resumeSignal]) {
|
| - if (_subscription == null) {
|
| - throw new StateError("Subscription has been unsubscribed");
|
| - }
|
| + if (_subscription == null) return;
|
| _subscription.pause(resumeSignal);
|
| }
|
|
|
| void resume() {
|
| - if (_subscription == null) {
|
| - throw new StateError("Subscription has been unsubscribed");
|
| - }
|
| + if (_subscription == null) return;
|
| _subscription.resume();
|
| }
|
|
|
| void cancel() {
|
| - if (_subscription == null) {
|
| - throw new StateError("Subscription has been unsubscribed");
|
| + if (_subscription != null) {
|
| + _subscription.cancel();
|
| + _subscription = null;
|
| }
|
| - _subscription.cancel();
|
| - _subscription = null;
|
| }
|
|
|
| // _EventOutputSink interface. Sends data to this subscription.
|
|
|