Skip to content

Commit

Permalink
Update SDK to version 2.0.0-dev.55.0. (flutter#8)
Browse files Browse the repository at this point in the history
Remove use of deprecated constants.
  • Loading branch information
lrhn authored Jun 1, 2018
1 parent 3e9f522 commit 6743193
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: dart
sudo: false
dart:
- dev
- stable

dart_task:
- test
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.5

* Update SDK to 2.0.0-dev.

## 2.0.4

* Declare support for `async` 2.0.0.
Expand Down
6 changes: 3 additions & 3 deletions lib/http_multi_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ class HttpMultiServer extends StreamView<HttpRequest> implements HttpServer {
remainingRetries ??= 5;

if (!await supportsIPv4) {
return await bind(InternetAddress.LOOPBACK_IP_V6, port);
return await bind(InternetAddress.loopbackIPv6, port);
}

var v4Server = await bind(InternetAddress.LOOPBACK_IP_V4, port);
var v4Server = await bind(InternetAddress.loopbackIPv4, port);
if (!await supportsIPv6) return v4Server;

try {
// Reuse the IPv4 server's port so that if [port] is 0, both servers use
// the same ephemeral port.
var v6Server = await bind(InternetAddress.LOOPBACK_IP_V6, v4Server.port);
var v6Server = await bind(InternetAddress.loopbackIPv6, v4Server.port);
return new HttpMultiServer([v4Server, v6Server]);
} on SocketException catch (error) {
if (error.osError.errorCode != _addressInUseErrno) rethrow;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'dart:io';
/// Returns whether this computer supports binding to IPv6 addresses.
final Future<bool> supportsIPv6 = () async {
try {
var socket = await ServerSocket.bind(InternetAddress.LOOPBACK_IP_V6, 0);
var socket = await ServerSocket.bind(InternetAddress.loopbackIPv6, 0);
socket.close();
return true;
} on SocketException catch (_) {
Expand All @@ -19,7 +19,7 @@ final Future<bool> supportsIPv6 = () async {
/// Returns whether this computer supports binding to IPv4 addresses.
final Future<bool> supportsIPv4 = () async {
try {
var socket = await ServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0);
var socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
socket.close();
return true;
} on SocketException catch (_) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: http_multi_server
version: 2.0.4
version: 2.0.5
author: "Dart Team <misc@dartlang.org>"
homepage: https://github.com/dart-lang/http_multi_server
description:
A dart:io HttpServer wrapper that handles requests from multiple servers.
environment:
sdk: ">=1.13.0 <2.0.0"
sdk: ">=2.0.0-dev.55.0 <3.0.0"
dependencies:
async: ">=1.2.0 <3.0.0"
dev_dependencies:
Expand Down

0 comments on commit 6743193

Please sign in to comment.