Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
fixes issue with incrementing cursor too late
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-haproff committed Jul 29, 2016
1 parent 851302d commit 3eda2d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eventor/ServiceActivator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public function addActivator($eventName, callable $a)
public function traverseStream(EventStreamInterface $s, EventStreamCursorInterface $cursor)
{
foreach ($s as $event) {
$cursor->increment();

if (empty($this->activators[$event->getType()])) continue;

try {
Expand All @@ -24,8 +26,6 @@ public function traverseStream(EventStreamInterface $s, EventStreamCursorInterfa
// @todo do something with exceptions here
var_dump($e->getMessage());
}

$cursor->increment();
}
}

Expand Down

0 comments on commit 3eda2d9

Please sign in to comment.