Author: robert
Date: Thu Jul 3 19:03:56 2008
New Revision: 933
Modified:
trunk/plugins/ident/geoip
Log:
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.)
Modified: trunk/plugins/ident/geoip
==============================================================================
--- trunk/plugins/ident/geoip (original)
+++ trunk/plugins/ident/geoip Thu Jul 3 19:03:56 2008
@@ -15,11 +15,10 @@
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 );