Skip to content

Commit 865e2f8

Browse files
committed
don't roll back transactions that already were rolled back
1 parent db2a97d commit 865e2f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Bolt/BoltUnmanagedTransaction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use Bolt\Bolt;
1717
use Bolt\error\ConnectionTimeoutException;
18+
use Bolt\error\IgnoredException;
1819
use Bolt\error\MessageException;
1920
use Bolt\protocol\V3;
2021
use Laudis\Neo4j\Contracts\ConnectionInterface;

src/Common/TransactionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function retry(callable $tsxFactory, callable $tsxHandler)
4141

4242
return $tbr;
4343
} catch (Neo4jException $e) {
44-
if ($transaction && in_array($e->getClassification(), self::ROLLBACK_CLASSIFICATIONS)) {
44+
if ($transaction && !in_array($e->getClassification(), self::ROLLBACK_CLASSIFICATIONS)) {
4545
$transaction->rollback();
4646
}
4747

0 commit comments

Comments
 (0)