The timeout configured in the client only uses s.setSoTimeout(timeout); -- this timeout only affects read
This means that the timeout does not change for connecting to the clamav host, as you would expect, which instead relies on the default timeouts. They can be very long.
I've created a patch to address this, which I believe works, but you would want to verify.