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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart

Issue 1126403002: pub: don't start the admin server if no --admin-port flag was given. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests Created 5 years, 7 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 | sdk/lib/_internal/pub/lib/src/command/serve.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart b/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
index bfd97b35aff834ff353ff2fe77ff0d46f067d7b0..a8a56f0df048f8eb2b6c84f1ae24643a9ddb241e 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart
@@ -184,14 +184,10 @@ class AssetEnvironment {
/// Starts up the admin server on an appropriate port and returns it.
///
/// This may only be called once on the build environment.
- Future<AdminServer> startAdminServer([int port]) {
+ Future<AdminServer> startAdminServer(int port) {
// Can only start once.
assert(_adminServer == null);
- // The admin server is bound to one before the base port by default, unless
- // it's ephemeral in which case the admin port is too.
- if (port == null) port = _basePort == 0 ? 0 : _basePort - 1;
-
return AdminServer.bind(this, _hostname, port)
.then((server) => _adminServer = server);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command/serve.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698