Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Unified Diff: utils/pub/io.dart

Issue 11881030: No longer work around issue 7761. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 665680e828ebc871f4c4cec1e81cc2a4fd8680ac..2a4e89b1684cfed57bf5d8fed70bcee6ae2ece83 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -610,19 +610,18 @@ class _OutputStreamConsumer implements StreamConsumer<List<int>, dynamic> {
if (!completed) completer.completeError(e, stack);
completed = true;
}
- }, onDone: () {
- _outputStream.close();
- // TODO(nweiz): wait until _outputStream.onClosed is called once issue
- // 7761 is fixed.
- if (!completed) completer.complete(null);
- completed = true;
- });
+ }, onDone: () => _outputStream.close());
_outputStream.onError = (e) {
if (!completed) completer.completeError(e);
completed = true;
};
+ _outputStream.onClosed = () {
+ if (!completed) completer.complete();
+ completed = true;
+ };
+
return completer.future;
}
}
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698