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

Unified Diff: utils/pub/io.dart

Issue 10913034: Fix pub to close connection to dartlang.org when it's done downloading (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated Created 8 years, 4 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 | « no previous file | 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 e3fc8e0202c4b84edcfc59abe54584009037bf9d..0874ba876edffd49c9414d74417bec7b0577450b 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -291,7 +291,8 @@ String getFullPath(entry) => new File(_getPath(entry)).fullPathSync();
*/
InputStream httpGet(uri) {
var resultStream = new ListInputStream();
- var connection = new HttpClient().getUrl(_getUri(uri));
+ var client = new HttpClient();
+ var connection = client.getUrl(_getUri(uri));
// TODO(nweiz): propagate this error to the return value. See issue 3657.
connection.onError = (e) { throw e; };
@@ -302,7 +303,7 @@ InputStream httpGet(uri) {
"HTTP request for $uri failed with status ${response.statusCode}");
}
- pipeInputToInput(response.inputStream, resultStream);
+ pipeInputToInput(response.inputStream, resultStream, client.shutdown);
};
return resultStream;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698