Skip to content

Commit

Permalink
Fix transaction attempts counter for sqlsrv (#43176)
Browse files Browse the repository at this point in the history
This brings back transactions attempts for sqlsrv driver
  • Loading branch information
krasucki authored Jul 14, 2022
1 parent 4264f2e commit 46cdc3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/SqlServerConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function transaction(Closure $callback, $attempts = 1)
{
for ($a = 1; $a <= $attempts; $a++) {
if ($this->getDriverName() === 'sqlsrv') {
return parent::transaction($callback);
return parent::transaction($callback, $attempts);
}

$this->getPdo()->exec('BEGIN TRAN');
Expand Down

0 comments on commit 46cdc3c

Please sign in to comment.