Skip to content

Commit

Permalink
fix log output end of stream in subscription engine
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Mar 27, 2024
1 parent 8b0a476 commit a54b413
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 a54b413

Please sign in to comment.