Set LWP::UserAgent timeout in dsa-check-mirrorsync
[mirror/dsa-nagios.git] / dsa-nagios-checks / checks / dsa-check-mirrorsync
index 8e8ec08..5a45e0c 100755 (executable)
@@ -111,6 +111,7 @@ my $schema = $params->{'ssl'} ? 'https' : 'http';
 
 foreach my $slave (@slaves) {
        my $ua = LWP::UserAgent->new;
+       $ua->timeout(10);
        $ua->proxy('http', "$schema://$slave");
        print "Requesting $schema://$host/$path from $slave\n" if $params->{'verbose'};
        my $response = $ua->get("$schema://$host/$path");