From 29ea9516806e9a8ca6519fcf987dbd684793ebdd Mon Sep 17 00:00:00 2001 From: Robert Spier Date: Fri, 4 Jul 2008 02:03:56 +0000 Subject: [PATCH] Recreate the Geo::IP object for each message. (Otherwise it will hold the underlying database file handle open, and it doesn't like when that file changes underneath it.) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@933 958fd67b-6ff1-0310-b445-bb7760255be9 --- plugins/ident/geoip | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/ident/geoip b/plugins/ident/geoip index 60ab8d0..d7a537c 100644 --- a/plugins/ident/geoip +++ b/plugins/ident/geoip @@ -15,11 +15,10 @@ or greylist. use Geo::IP; -my $geoip = Geo::IP->new(GEOIP_STANDARD); - sub hook_connect { my ($self) = @_; + my $geoip = Geo::IP->new(GEOIP_STANDARD); my $country = $geoip->country_code_by_addr( $self->qp->connection->remote_ip );