diff --git a/plugins/dnsbl b/plugins/dnsbl index 051181a..7e5c0fb 100644 --- a/plugins/dnsbl +++ b/plugins/dnsbl @@ -51,9 +51,11 @@ sub process_sockets { my @ready = $sel->can_read(5); $self->log(8, "DONE waiting for dnsbl dns, got " , scalar @ready, " answers ...") ; + return '' unless @ready; for my $socket (@ready) { my $query = $res->bgread($socket); + $sel->remove($socket); undef $socket; my $dnsbl; @@ -81,6 +83,11 @@ sub process_sockets { } + if ($sel->count) { + # loop around if we have dns blacklists left to see results from + return $self->process_sockets(); + } + # if there was more to read; then forget it $conn->notes('dnsbl_sockets', undef);