Avoid IPv4 when unsupported (#37) Skip a test which checks that binding to `anyIPv4` doesn't bind to an IPv6 address when IPv4 isn't supported.
diff --git a/CHANGELOG.md b/CHANGELOG.md index f4e4dc1..32eca00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,3 +1,5 @@ +## 3.1.1-dev + ## 3.1.0 * Add `HttpMultiServer.bindSecure` to match `HttpMultiServer.bind`.
diff --git a/pubspec.yaml b/pubspec.yaml index af58e87..c03d358 100644 --- a/pubspec.yaml +++ b/pubspec.yaml
@@ -1,5 +1,5 @@ name: http_multi_server -version: 3.1.0 +version: 3.1.1-dev description: >- A dart:io HttpServer wrapper that handles requests from multiple servers.
diff --git a/test/http_multi_server_test.dart b/test/http_multi_server_test.dart index 96ffa23..3a0bdcf 100644 --- a/test/http_multi_server_test.dart +++ b/test/http_multi_server_test.dart
@@ -296,6 +296,7 @@ }); test('listens on specified hostname', () async { + if (!await supportsIPv4) return; final server = await HttpMultiServer.bindSecure(InternetAddress.anyIPv4, 0, context); server.listen((request) { @@ -303,10 +304,8 @@ request.response.close(); }); - if (await supportsIPv4) { - expect(client.read(Uri.https('127.0.0.1:${server.port}', '')), - completion(equals('got request'))); - } + expect(client.read(Uri.https('127.0.0.1:${server.port}', '')), + completion(equals('got request'))); if (await supportsIPv6) { expect(client.read(Uri.https('[::1]:${server.port}', '')),