Skip to content

Use HttpMultiServer loopback #2265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build_daemon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.1

- Use `HttpMultiServer` to better support IPv6 and IPv4 workflows.

## 0.6.0

- Add retry logic to the state file helpers `runningVersion` and `currentOptions`.
Expand Down
5 changes: 4 additions & 1 deletion build_daemon/lib/src/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:convert';
import 'dart:io';

import 'package:built_value/serializer.dart';
import 'package:http_multi_server/http_multi_server.dart';
import 'package:pool/pool.dart';
import 'package:shelf/shelf_io.dart';
import 'package:shelf_web_socket/shelf_web_socket.dart';
Expand Down Expand Up @@ -79,7 +80,9 @@ class Server {
_removeChannel(channel);
});
});
_server = await serve(handler, 'localhost', 0);

_server = await HttpMultiServer.loopback(0);
serveRequests(_server, handler);
return _server.port;
}

Expand Down
3 changes: 2 additions & 1 deletion build_daemon/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build_daemon
version: 0.6.0
version: 0.6.1
description: A daemon for running Dart builds.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/build/tree/master/build_daemon
Expand All @@ -10,6 +10,7 @@ environment:
dependencies:
built_collection: ^4.1.0
built_value: ^6.3.0
http_multi_server: ^2.0.0
pedantic: ^1.0.0
package_resolver: ^1.0.6
path: ^1.6.2
Expand Down