diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 4cad26f587d5433bf405f8682210899903ac0d55..1b41a4e1a055d36db417a53c2663a54847b65ab3 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -178,9 +178,9 @@ Future streamFirst(Stream stream) { /// Returns a wrapped version of [stream] along with a [StreamSubscription] that /// can be used to control the wrapped stream. Pair<Stream, StreamSubscription> streamWithSubscription(Stream stream) { - var controller = stream.isSingleSubscription ? - new StreamController() : - new StreamController.multiSubscription(); + var controller = stream.isBroadcast ? + new StreamController.broadcast() : + new StreamController(); var subscription = stream.listen(controller.add, onError: controller.signalError, onDone: controller.close); diff --git a/test/test_pub.dart b/test/test_pub.dart index e16be37f47dc317faea87e5ea9fcb4d9733ec0de..e8c4e5cf14a363716ecd752dddb1b75f2717f1c5 100644 --- a/test/test_pub.dart +++ b/test/test_pub.dart @@ -1234,7 +1234,7 @@ class ScheduledProcess { Future<PubProcess> _processFuture; /// The process that's scheduled to run. It may be null. - Process _process; + PubProcess _process; /// The exit code of the scheduled program. It may be null. int _exitCode;