Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 47050
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: OLAF [...] cpan.org
Requestors: jtk [...] northwestern.edu
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: bgsend socket error detection
Hi Olaf, It appears there is some logic error in the bgsend socket acquisition code. In lib/Net/DNS/Resolver/Base.pm line 1002 there is the line that reads: unless (scalar(@socket)) { However, this will always evaluate to true, because earlier the assignments will either populate the array with the socket or an undef at the specified index. That it is, the size of the array will always be greater than zero, thus that test's code block will never been run. This isn't a critical problem, because it'll be caught later in the foreach loop with the "!defined test", but things end up being reported as a different type of error once than is intended. Couple other minor comments. There is some extraneous comment and a single quote character on line 1003. Just looks like something got chopped off or forgotten. There is a typo in the error message in this procedure, search for 'Unsoported'. Also, did you intend to support persistent_udp in bgsend? It doesn't appear to be available. It might be nice to either add that or make a note that it is not available in the routine. Additionally it doesn't look like TCP is supported with the bg routines, perhaps something else to make note of.
Sorry this took so long. In the forthcoming release: - unless (scalar(@socket)) { + unless ($socket[$sockfamily]) { $self->errorstring("could not get socket"); return; } Also made the note about persistent sockets in the bgsend code. Stalling the ticket for now as getting persistent sockets in that part of the code seems to be a good wishlist item
From: rwfranks [...] acm.org
persistent sockets will be supported in Net::DNS 1.03
Supported in upcoming 1.03