Close spamd socket when we're finished with it

QP's connection to spamd unnecessarily persists beyond the run of the
spamassassin plugin itself.  This closes the socket as soon as we're
finished using it.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
This commit is contained in:
jaredj 2009-04-02 16:12:42 -05:00 committed by Ask Bjørn Hansen
parent 687fce7caa
commit 89e391e9d2
2 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,5 @@
Close spamd socket after reading the result back (Jared Johnson)
p0f plugin updates (Tom Callahan) p0f plugin updates (Tom Callahan)
Change transaction->add_recipient to skip adding "null" rcpt if passed Change transaction->add_recipient to skip adding "null" rcpt if passed

View File

@ -189,6 +189,7 @@ sub hook_data_post { # check_spam
} }
my $tests = <SPAMD>; my $tests = <SPAMD>;
close SPAMD;
$tests =~ s/\015//; # hack for outlook $tests =~ s/\015//; # hack for outlook
$flag = $flag eq 'True' ? 'Yes' : 'No'; $flag = $flag eq 'True' ? 'Yes' : 'No';
$self->log(LOGDEBUG, "check_spam: finished reading from spamd"); $self->log(LOGDEBUG, "check_spam: finished reading from spamd");