From a445115697678b153d246ce315e3471213757e5d Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Sat, 19 Mar 2011 17:37:13 +0000 Subject: - properly discnnect from db to avoid warning --- lib/MGA/Mirrors/DB.pm | 8 ++++++++ 1 file changed, 8 insertions(+) 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) = @_; -- cgit v1.2.1