CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
Net::DNS timeout



Nov 2, 2000, 3:48 PM

Post #1 of 1 (1034 views)
Net::DNS timeout Can't Post

Hi everyone.

I am using Perl and the module Net::DNS for performing a zone transfer.
My problem is that I create a resolver object that seems to ignore the "timeout" parameter I set.

I put the code here:


#!/usr/bin/perl -w

use Net::DNS ;

my $res = new Net::DNS::Resolver;

$res->tcp_timeout (1) ;
$res->retry (1) ;
$res->retrans (1) ;
print "before transfer" ;
print "timeout: ", $res->tcp_timeout, "\n" ;
print " retrys: ", $res->retry, "\n";
print " retrans: ", $res->retrans, "\n";
my @records = $res->axfr("uy.");
foreach (@records) {
$_->print ;
print "after transfer " ;


The programs works well when the nameserver works well, but the nameserver "UUCP-GW-2.PA.DEC.COM" sometimes works but sometimes delays a long time.
I want the resolver to wait no more than 1 second, retry 1 time and wait 1 second before retrys..
The "prints" do print the right values (1, 1, 1), but after printing "retrans" the program delays for some minutes...

Thank you..



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives