From: Moritz Bunkus Date: Mon, 1 Feb 2010 11:12:19 +0000 (+0100) Subject: Nach jedem Request die Standard-Datenbankverbindung schließen X-Git-Tag: release-2.6.2beta1~309 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7bd555b62a7501d750d7989b75b46a40c5e7c1a3;p=kivitendo-erp.git Nach jedem Request die Standard-Datenbankverbindung schließen --- 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 {