https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6872
--- Comment #6 from Mark Martinec <[email protected]> --- Before returning to the original problem report, first a quick explanation on what my first patch broke. The symptoms were noticed by very long nightly runs of masschecks caused by unnecessarily long scan times. If there was at least one unsuccessful DNS reply, it was ignored and the code then waited until RBL timeout (default 15 seconds, often set to 5 seconds). The culprit is the following section in the old code in DnsResolver.pm (before any changes): if (defined $packet && defined $packet->header && defined $packet->question && defined $packet->answer) { ... deal with a received DNS packet ... } The problem here is that $packet->question and $packet->answer return a list (possibly empty). The defined() of such list always returns true, so the above test just wasted unnecessary cycles to test the question and answer sections, but then ignored the result. My first patch tried to 'fix' this by doing what seemed to be the intention, i.e. ignore a packet with an empty answer section. But that is wrong, such a response still needs to hit its callback routine and be removed from the list of waited-upon queries. As it happens, the original (broken) code managed to be doing the right thing, while the 'fixed' code broke it. Now, the today's change hopefully does *the*right*thing*, while also providing a more informative debugging. -- You are receiving this mail because: You are the assignee for the bug.
