Use InternetAddress instead of String (#6922)
This commit is contained in:
@@ -20,7 +20,7 @@ import '../globals.dart';
|
||||
import 'coverage_collector.dart';
|
||||
|
||||
final String _kSkyShell = Platform.environment['SKY_SHELL'];
|
||||
const String _kHost = '127.0.0.1';
|
||||
final InternetAddress _kHost = InternetAddress.LOOPBACK_IP_V4;
|
||||
const String _kRunnerPath = '/runner';
|
||||
const String _kShutdownPath = '/shutdown';
|
||||
|
||||
@@ -50,8 +50,8 @@ Future<_ServerInfo> _startServer() async {
|
||||
else if (!socket.isCompleted && request.uri.path == _kShutdownPath)
|
||||
socket.completeError('Failed to start test');
|
||||
});
|
||||
return new _ServerInfo(server, 'ws://$_kHost:${server.port}$_kRunnerPath',
|
||||
'ws://$_kHost:${server.port}$_kShutdownPath', socket.future);
|
||||
return new _ServerInfo(server, 'ws://${_kHost.address}:${server.port}$_kRunnerPath',
|
||||
'ws://${_kHost.address}:${server.port}$_kShutdownPath', socket.future);
|
||||
}
|
||||
|
||||
Future<Process> _startProcess(String mainPath, { String packages, int observatoryPort }) {
|
||||
@@ -166,7 +166,7 @@ void main() {
|
||||
Process processToKill = process;
|
||||
process = null;
|
||||
CoverageCollector.instance.collectCoverage(
|
||||
host: _kHost,
|
||||
host: _kHost.address,
|
||||
port: observatoryPort,
|
||||
processToKill: processToKill
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user