From a868219c01624aeb0b2d446957e1165cc03a24fa Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Fri, 16 Feb 2024 22:32:10 -0600 Subject: [PATCH] Fix cancellation not being forwarded to split Closes #109. --- src/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions.php b/src/functions.php index 41d462d..9975424 100644 --- a/src/functions.php +++ b/src/functions.php @@ -151,7 +151,7 @@ function split(ReadableStream $source, string $delimiter, ?Cancellation $cancell */ function splitLines(ReadableStream $source, ?Cancellation $cancellation = null): \Traversable { - foreach (split($source, "\n") as $line) { + foreach (split($source, "\n", $cancellation) as $line) { yield \rtrim($line, "\r"); } }