Index: pkg/scheduled_test/lib/scheduled_server.dart |
diff --git a/pkg/scheduled_test/lib/scheduled_server.dart b/pkg/scheduled_test/lib/scheduled_server.dart |
index 743e2b63b2ec679b0d2313a2f891e89537335a39..13dd34054f400b95c35378efbee6f9fe00ffecac 100644 |
--- a/pkg/scheduled_test/lib/scheduled_server.dart |
+++ b/pkg/scheduled_test/lib/scheduled_server.dart |
@@ -38,7 +38,7 @@ class ScheduledServer { |
ScheduledServer._(this._server, this.description); |
/// Creates a new server listening on an automatically-allocated port on |
- /// localhost. [description] is used to refer to the server in debugging |
+ /// 127.0.0.1. [description] is used to refer to the server in debugging |
/// messages. |
factory ScheduledServer([String description]) { |
var id = _count++; |
@@ -46,7 +46,7 @@ class ScheduledServer { |
var scheduledServer; |
scheduledServer = new ScheduledServer._(schedule(() { |
- return SafeHttpServer.bind("localhost", 0).then((server) { |
+ return SafeHttpServer.bind("127.0.0.1", 0).then((server) { |
server.listen(scheduledServer._handleRequest, |
onError: (e) => currentSchedule.signalError(e)); |
currentSchedule.onComplete.schedule(server.close); |
@@ -60,7 +60,7 @@ class ScheduledServer { |
Future<int> get port => _server.then((s) => s.port); |
/// The base URL of the server, including its port. |
- Future<Uri> get url => port.then((p) => Uri.parse("http://localhost:$p")); |
+ Future<Uri> get url => port.then((p) => Uri.parse("http://127.0.0.1:$p")); |
/// Schedules [handler] to handle a request to the server with [method] and |
/// [path]. The schedule will wait until an HTTP request is received. If that |