From a5ecd18d276ae1a43b92d96e2347a077a1a52427 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sat, 20 Jan 2007 12:58:13 +0000 Subject: [PATCH] connection to db is done in handler, so should do potential rollback and disconnect there too --- ND.pm | 3 +++ ND/Web/XMLPage.pm | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ND.pm b/ND.pm index 50629e8..28bd90e 100755 --- a/ND.pm +++ b/ND.pm @@ -46,6 +46,9 @@ sub handler { $page = ND::Web::Page->new(PAGE => $page, DBH => $ND::DBH, URI => $ENV{REQUEST_URI}); $page->render; + $ND::DBH->rollback unless $ND::DBH->{AutoCommit}; + $ND::DBH->disconnect; + return Apache2::Const::OK; } diff --git a/ND/Web/XMLPage.pm b/ND/Web/XMLPage.pm index 2a876a4..561fdc8 100644 --- a/ND/Web/XMLPage.pm +++ b/ND/Web/XMLPage.pm @@ -125,11 +125,6 @@ sub render : method { my $output = $template->output; print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output); print $output; - - - $DBH->rollback unless $DBH->{AutoCommit}; - $DBH->disconnect; - }; 1; -- 2.39.2