Skip to content

Commit

Permalink
Merge branch 'master' of github.com:burzum/event-store-http-client in…
Browse files Browse the repository at this point in the history
…to master
  • Loading branch information
Florian Krämer committed Nov 19, 2020
2 parents 6d7e566 + 3f23136 commit c037482
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/Internal/EventStoreCatchUpSubscription.php
Expand Up @@ -15,13 +15,11 @@

use Closure;
use Prooph\EventStore\CatchUpSubscriptionSettings;
use Prooph\EventStore\EventAppearedOnSubscription;
use Prooph\EventStore\EventStoreCatchUpSubscription as SyncEventStoreCatchUpSubscription;
use Prooph\EventStore\EventStoreConnection;
use Prooph\EventStore\EventStoreSubscription;
use Prooph\EventStore\Internal\DropData;
use Prooph\EventStore\ResolvedEvent;
use Prooph\EventStore\SubscriptionDropped;
use Prooph\EventStore\SubscriptionDropReason;
use Prooph\EventStore\UserCredentials;
use SplQueue;
Expand Down Expand Up @@ -164,19 +162,19 @@ private function loadHistoricalEvents(): void
private function subscribeToStream(): void
{
if (! $this->shouldStop) {
$eventAppeared = function(
EventStoreSubscription $subscription,
ResolvedEvent $resolvedEvent
): void {
($this->callback)($subscription, $resolvedEvent);
};

$subscriptionDropped = function(
EventStoreSubscription $subscription,
SubscriptionDropReason $reason,
?Throwable $exception = null
): void {
($this->callback)($reason, $exception);
$eventAppeared = function (
EventStoreSubscription $subscription,
ResolvedEvent $resolvedEvent
): void {
($this->callback)($subscription, $resolvedEvent);
};

$subscriptionDropped = function (
EventStoreSubscription $subscription,
SubscriptionDropReason $reason,
?Throwable $exception = null
): void {
($this->callback)($reason, $exception);
};

$subscription = empty($this->streamId)
Expand Down

0 comments on commit c037482

Please sign in to comment.