Skip to content

Commit

Permalink
Merge pull request #558 from patchlevel/fix-log-output
Browse files Browse the repository at this point in the history
fix log output end of stream in subscription engine
  • Loading branch information
DavidBadura authored Mar 27, 2024
2 parents b774028 + a54b413 commit 1fd21cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Subscription/Engine/DefaultSubscriptionEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ function (array $subscriptions) use ($limit): void {
}
}
} finally {
$endIndex = $stream?->index();
$endIndex = $stream?->index() ?: $startIndex;
$stream?->close();

if ($messageCounter > 0) {
Expand Down Expand Up @@ -382,7 +382,7 @@ function (array $subscriptions) use ($limit): void {
$this->logger?->info(
sprintf(
'Subscription Engine: End of stream on position "%d" has been reached, finish processing.',
$endIndex ?: 'unknown',
$endIndex,
),
);
},
Expand Down

0 comments on commit 1fd21cb

Please sign in to comment.