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

Unified Diff: utils/pub/oauth2.dart

Issue 11528005: Reapply "Stop working around issue 6984." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « utils/pub/io.dart ('k') | utils/tests/pub/oauth2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/oauth2.dart
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart
index a7800e4224bd02ae8eb0f74e38576848c28fcbfc..78cd4c2766cf2d2fb0a577c0fc43e25c96a9a3c6 100644
--- a/utils/pub/oauth2.dart
+++ b/utils/pub/oauth2.dart
@@ -177,13 +177,11 @@ Future<Client> _authorize() {
if (queryString == null) queryString = '';
response.statusCode = 302;
response.headers.set('location', 'http://pub.dartlang.org/authorized');
- return Futures.wait([
- closeHttpResponse(request, response),
- grant.handleAuthorizationResponse(queryToMap(queryString))
- ]);
- }).transform((results) {
+ response.outputStream.close();
+ return grant.handleAuthorizationResponse(queryToMap(queryString));
+ }).transform((client) {
server.close();
- return results[1];
+ return client;
}), completer);
});
server.listen('127.0.0.1', 0);
« no previous file with comments | « utils/pub/io.dart ('k') | utils/tests/pub/oauth2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698