From ae6f3a6b3df0c96d8969262f59965db1535abc81 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 13 May 2014 15:18:33 +0000 Subject: [PATCH] Don't skip begin_work() if commit() fails --- PBot/MessageHistory_SQLite.pm | 2 +- PBot/VERSION.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/MessageHistory_SQLite.pm b/PBot/MessageHistory_SQLite.pm index 7f31e0d0..f7de0c6a 100644 --- a/PBot/MessageHistory_SQLite.pm +++ b/PBot/MessageHistory_SQLite.pm @@ -643,11 +643,11 @@ sub commit_message_history { #$self->{pbot}->logger->log("Commiting $self->{new_entries} messages to SQLite\n"); eval { $self->{dbh}->commit(); - $self->{dbh}->begin_work(); }; $self->{pbot}->logger->log("SQLite error $@ when committing $self->{new_entries} entries.\n") if $@; + $self->{dbh}->begin_work(); $self->{new_entries} = 0; } } diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 0cfd4716..c97ff20a 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 570, + BUILD_REVISION => 571, BUILD_DATE => "2014-05-13", };