summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:09:15 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2014-10-16 18:09:15 +0200
commit7ce5b04d20684101748812cf2bd5e7d6275bd5e7 (patch)
tree590882b1275ec3729b8fa13ed5b040da3851b234 /Bugzilla.pm
parentb1bdb0ed35a75233edc1a7c59b697bb08adc38c7 (diff)
downloadbugzilla-7ce5b04d20684101748812cf2bd5e7d6275bd5e7.tar.gz
bugzilla-7ce5b04d20684101748812cf2bd5e7d6275bd5e7.tar.xz
Bug 1082557: Use a persistent connection to the SMTP server for improved performance
r=dylan a=glob
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 2347a8ae8..048e72d48 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -659,13 +659,16 @@ sub memcached {
# Per-process cleanup. Note that this is a plain subroutine, not a method,
# so we don't have $class available.
sub _cleanup {
- my $main = Bugzilla->request_cache->{dbh_main};
- my $shadow = Bugzilla->request_cache->{dbh_shadow};
+ my $cache = Bugzilla->request_cache;
+ my $main = $cache->{dbh_main};
+ my $shadow = $cache->{dbh_shadow};
foreach my $dbh ($main, $shadow) {
next if !$dbh;
$dbh->bz_rollback_transaction() if $dbh->bz_in_transaction;
$dbh->disconnect;
}
+ my $smtp = $cache->{smtp};
+ $smtp->disconnect if $smtp;
clear_request_cache();
# These are both set by CGI.pm but need to be undone so that