Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: MCARDWELL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.72
Fixed in: (no value)



Subject: Timeout doesn't work with bgsend/bgread
The following code hangs forever if the lookup supplied times out. I've been testing this with "testing10.com" which is a domain I came across accidently that is timing out. ======================================================================== #!/usr/bin/perl use strict; use warnings; use IO::Select; use Net::DNS; my $res = Net::DNS::Resolver->new; $res->udp_timeout(5); my $sock = $res->bgsend($ARGV[0],'NS'); my $sel = IO::Select->new( $sock ); my( $readable, undef, $exception ) = IO::Select->select( $sel, undef, $sel ); ======================================================================== To deal with this I have had to add a timeout to the select call, and a section of code which keeps track of DNS queries that have been submitted but not responded to. In the above code, after 5 seconds, I would have expected either the $readable or $exception arrayrefs to contain the socked which has timed out. If this is a bug, please fix, if not, please consider it a feature request. Thanks.
From: rwfranks [...] acm.org
On Tue Apr 02 10:36:50 2013, MCARDWELL wrote: Show quoted text
>8
Show quoted text
> > If this is a bug, please fix, if not, please consider it a feature > request. Thanks.
bgsend/bgread timeout will be implemented in Net::DNS 1.03
Fixed in upcoming 1.03