Don't trap $self in the closure (causes circular refs and never gets freed)

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@596 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2005-12-31 14:53:50 +00:00
parent e440b7bd65
commit 1c2009764f

View File

@ -76,8 +76,9 @@ sub _query {
if (exists($self->{cache}{$type}{$host}) &&
$self->{cache_timeout}{$type}{$host} >= $now) {
# print "CACHE HIT!\n";
my $result = $self->{cache}{$type}{$host};
$self->AddTimer(0, sub {
$asker->run_callback($self->{cache}{$type}{$host}, $host);
$asker->run_callback($result, $host);
});
return 1;
}