Index: sdk/lib/io/io_sink.dart |
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart |
index ffc02cebf4024db6d7fe7ae3b8570742e25f9436..d8b78fd4bc914f4b11f727b2032bb4161c3ab2da 100644 |
--- a/sdk/lib/io/io_sink.dart |
+++ b/sdk/lib/io/io_sink.dart |
@@ -137,7 +137,7 @@ class _IOSinkImpl<T> implements IOSink<T> { |
Future<T> get done { |
_controller; |
- return _pipeFuture.then((_) => this); |
+ return _pipeFuture; |
} |
void _completeWriteStreamCompleter([error]) { |
@@ -160,7 +160,7 @@ class _IOSinkImpl<T> implements IOSink<T> { |
var future = _controller.stream.pipe(_target); |
future.then((_) => _completeWriteStreamCompleter(), |
onError: (error) => _completeWriteStreamCompleter(error)); |
- _pipeFuture = future.then((_) => this); |
+ _pipeFuture = future.then((value) => value); |
} |
return _controllerInstance; |
} |
@@ -228,7 +228,7 @@ class _IOSinkImpl<T> implements IOSink<T> { |
if (unbind) { |
return _writeStreamCompleter.future; |
} else { |
- return _pipeFuture.then((_) => this); |
+ return _pipeFuture; |
} |
} |
} |