From 3b510b3656a348e369e19bf0e6bd85f344359a84 Mon Sep 17 00:00:00 2001 From: Sammyjo20 <29132017+Sammyjo20@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:00:47 +0100 Subject: [PATCH] Prevent detecting infinite loops with async --- src/Paginator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paginator.php b/src/Paginator.php index 53a421f..9be4cf0 100644 --- a/src/Paginator.php +++ b/src/Paginator.php @@ -104,7 +104,7 @@ public function __construct(Connector $connector, Request $request) $this->totalResults += count($pageItems); }) ->onResponse(function (Response $response): void { - if ($this->detectInfiniteLoop === false) { + if ($this->detectInfiniteLoop === false || $this->isAsyncPaginationEnabled() === true) { return; }