You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/04/15 20:42:45 UTC
svn commit: r394350 -
/spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm
Author: jm
Date: Sat Apr 15 11:42:45 2006
New Revision: 394350
URL: http://svn.apache.org/viewcvs?rev=394350&view=rev
Log:
bug 3109: small bugfix; we were selecting twice in these loops, causing a slowdown
Modified:
spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm
Modified: spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm?rev=394350&r1=394349&r2=394350&view=diff
==============================================================================
--- spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm (original)
+++ spamassassin/branches/bug-3109-shortcircuiting/lib/Mail/SpamAssassin/Dns.pm Sat Apr 15 11:42:45 2006
@@ -354,11 +354,7 @@
* (1 - (($total - scalar @left) / $total) ** 2) + 0.5)
+ $self->{query_launch_time});
$deadline = $dynamic if ($dynamic < $deadline);
- until((($now = time) >= $deadline) ||
- ($self->{resolver}->poll_responses(1) > 0))
- {
- # TODO: should we call check_tick() here? we never did before
- }
+ $now = time;
}
}
@@ -383,11 +379,7 @@
* (1 - (($total - scalar @left) / $total) ** 2) + 0.5)
+ $self->{query_launch_time});
$deadline = $dynamic if ($dynamic < $deadline);
- until((($now = time) >= $deadline) ||
- ($self->{resolver}->poll_responses(1) > 0))
- {
- # TODO: should we call check_tick() here? we never did before
- }
+ $now = time; # and loop again
}
dbg("dns: success for " . ($total - @left) . " of $total queries");