You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2019/05/11 15:01:08 UTC

svn commit: r1859116 - /spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm

Author: hege
Date: Sat May 11 15:01:08 2019
New Revision: 1859116

URL: http://svn.apache.org/viewvc?rev=1859116&view=rev
Log:
Fix 3.4 async semantics

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm?rev=1859116&r1=1859115&r2=1859116&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm Sat May 11 15:01:08 2019
@@ -512,10 +512,11 @@ sub _submit_query {
     value => $value,
     subtest => $subtest,
   };
-  $pms->{async}->bgsend_and_start_lookup($lookup, $type, undef, $ent,
+  $ent = $pms->{async}->bgsend_and_start_lookup($lookup, $type, undef, $ent,
     sub { my ($ent, $pkt) = @_; $self->_finish_query($pms, $ent, $pkt); },
     master_deadline => $pms->{master_deadline}
   );
+  $pms->register_async_rule_start($rulename) if $ent;
 }
 
 sub _finish_query {
@@ -535,6 +536,7 @@ sub _finish_query {
       $ent->{value} =~ s/\@/[at]/g;
       $pms->test_log($ent->{value});
       $pms->got_hit($ent->{rulename}, '', ruletype => 'eval');
+      $pms->register_async_rule_finish($ent->{rulename});
       return;
     }
   }