From 7bd555b62a7501d750d7989b75b46a40c5e7c1a3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 1 Feb 2010 12:12:19 +0100 Subject: [PATCH] =?utf8?q?Nach=20jedem=20Request=20die=20Standard-Datenban?= =?utf8?q?kverbindung=20schlie=C3=9Fen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Dispatcher.pm | 1 + SL/Form.pm | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 44bf3be03..2599f5f0f 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -179,6 +179,7 @@ sub handle_request { $::locale = undef; $::form = undef; $::myconfig = (); + Form::disconnect_standard_dbh(); $::lxdebug->end_request; $::lxdebug->leave_sub; diff --git a/SL/Form.pm b/SL/Form.pm index 130a337ba..cfffd78e2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -63,10 +63,13 @@ use strict; my $standard_dbh; END { - if ($standard_dbh) { - $standard_dbh->disconnect(); - undef $standard_dbh; - } + disconnect_standard_dbh(); +} + +sub disconnect_standard_dbh { + return unless $standard_dbh; + $standard_dbh->disconnect(); + undef $standard_dbh; } sub _store_value { -- 2.20.1