aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) = @_;