aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mageia.org>2011-03-19 17:37:13 +0000
committerOlivier Thauvin <nanardon@mageia.org>2011-03-19 17:37:13 +0000
commita445115697678b153d246ce315e3471213757e5d (patch)
treea682a2bbd00bb34dd779e589e6c63088dbe79226 /lib
parentb1d93617939b76fad3c39d909ee0935abfe50eeb (diff)
downloadmgamirrors-a445115697678b153d246ce315e3471213757e5d.tar
mgamirrors-a445115697678b153d246ce315e3471213757e5d.tar.gz
mgamirrors-a445115697678b153d246ce315e3471213757e5d.tar.bz2
mgamirrors-a445115697678b153d246ce315e3471213757e5d.tar.xz
mgamirrors-a445115697678b153d246ce315e3471213757e5d.zip
- properly discnnect from db to avoid warning
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/Mirrors/DB.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/MGA/Mirrors/DB.pm b/lib/MGA/Mirrors/DB.pm
index bbc638d..b50e35f 100644
--- a/lib/MGA/Mirrors/DB.pm
+++ b/lib/MGA/Mirrors/DB.pm
@@ -58,6 +58,14 @@ sub db {
}
}
+sub DESTROY {
+ my ($self) = @_;
+
+ if ($self->{db}) {
+ $self->{db}->disconnect;
+ }
+}
+
sub locate_ips {
my ($self, @ips) = @_;