diff --git a/CHANGELOG.md b/CHANGELOG.md index e862aee..104c05a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.20 + +* Close worker `outputStream` on `cancel`. + ## 0.1.19 * Work around https://github.com/dart-lang/sdk/issues/35874. diff --git a/lib/src/driver/driver_connection.dart b/lib/src/driver/driver_connection.dart index 6dd9826..f30bf84 100644 --- a/lib/src/driver/driver_connection.dart +++ b/lib/src/driver/driver_connection.dart @@ -77,7 +77,10 @@ class StdDriverConnection implements DriverConnection { } @override - Future cancel() => _messageGrouper.cancel(); + Future cancel() async { + await _outputStream.close(); + await _messageGrouper.cancel(); + } } /// [DriverConnection] that works with an isolate via a [SendPort]. diff --git a/pubspec.yaml b/pubspec.yaml index 58d70cd..b2e3641 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: bazel_worker -version: 0.1.19 +version: 0.1.20 description: Tools for creating a bazel persistent worker. author: Dart Team