spamassassin: If clamd socket is not responding return imediately.

This commit is contained in:
Timo Makinen 2015-04-09 13:28:14 +03:00
parent 2c6e2ec4da
commit 27036136ff

View file

@ -79,7 +79,10 @@ sub check_clamav {
my $socket = IO::Socket::UNIX->new(
Type => SOCK_STREAM,
Peer => $self->{main}->{conf}->{clamav_socket}
) || info("ClamAV: Failed to connect socket, skipping virus check");
) or do {
info("ClamAV: Failed to connect socket, skipping virus check");
return;
};
$socket->send("nINSTREAM\n");
$socket->send(pack("N", length($$fulltext)));