Subject: | Timeouts don't seem to work |
tcp_timeout and udp_timeout seem to be ignored in version 0.55.
$res=Net::DNS::Resolver->new(nameservers=>[('63.249.108.169')]);
$res->tcp_timeout(10); $res->udp_timeout(10);
$Now = localtime; print "Before the good: $Now\n";
@TheGoodAXFR = $res->axfr('test.proper.com');
if(@TheGoodAXFR) { print "Worked\n" } else { print "Failed\n" };
$res=Net::DNS::Resolver->new(nameservers=>[('5.6.7.8')]);
$res->tcp_timeout(10); $res->udp_timeout(10);
$Now = localtime; print "Before the bad: $Now\n";
@TheBadAXFR = $res->axfr('bogus.proper.com');
if(@TheBadAXFR) { print "Worked\n" } else { print "Failed\n" };
$Now = localtime; print "After the bad: $Now\n";
produces:
Before the good: Sun Feb 12 09:54:56 2006
Worked
Before the bad: Sun Feb 12 09:54:56 2006
Failed
After the bad: Sun Feb 12 09:56:11 2006
I cannot figure out why the second AXFR takes 75 seconds, given that both timeouts are set
to 10.