Commit a253605c authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Fall back to IPv4 in devfs_test.dart (#10196)

Fixes the broken build in the Chromium bots
parent e8ac331d
......@@ -359,8 +359,14 @@ class MockVMService extends BasicMock implements VMService {
VM get vm => _vm;
Future<Null> setUp() async {
try {
_server = await HttpServer.bind(InternetAddress.LOOPBACK_IP_V6, 0);
_httpAddress = Uri.parse('http://[::1]:${_server.port}');
} on SocketException {
// Fall back to IPv4 if the host doesn't support binding to IPv6 localhost
_server = await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 0);
_httpAddress = Uri.parse('http://127.0.0.1:${_server.port}');
}
_server.listen((HttpRequest request) {
final String fsName = request.headers.value('dev_fs_name');
final String devicePath = UTF8.decode(BASE64.decode(request.headers.value('dev_fs_uri_b64')));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment