Skip to content

Commit

Permalink
fix(gorgone): Do not accept nested db transactions, and fail when thi…
Browse files Browse the repository at this point in the history
…s is attempted
  • Loading branch information
vuntz committed Jul 27, 2024
1 parent 0716eb2 commit ff7cc2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gorgone/gorgone/class/db.pm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ sub set_inactive_destroy {
sub start_transaction {
my $self = shift;

if ($self->{in_transaction}) {
$self->error('starting a transaction while already in a transaction', 'begin work');
return -1;
}

my $status;
if (!defined($self->{instance})) {
$status = $self->connect();
Expand Down

0 comments on commit ff7cc2a

Please sign in to comment.