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:
parent
e440b7bd65
commit
1c2009764f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user