On 9 Nov 2005, at 23:06, Brian Grossman wrote:

I was thinking about implementing dnsbl return codes and a brief
perusal of lib/Danga/DNS/Resolver.pm makes me think that resolver is a
bit hostile to the idea of multiple returns to a lookup.

Why? You should just get the callback called twice.

Confirmed.

But that makes notes('pending_dns_queries') (in trunk/plugins/dnsbl) go
negative, revealing a race between receiving the rest of the answers and
going on to the next plugin.

Got any suggestions on a more resilient way to lock here?

Hmm. I don't know too much about DNS, but can we assume that all the responses will come back in one packet? If so I guess we can accumulate the results and do the callback once. Or if we don't want to change the API I guess we could have a "finished()" callback. Thoughts?

Matt.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

Reply via email to