Set LWP::UserAgent timeout in dsa-check-mirrorsync
authorJulien Cristau <jcristau@debian.org>
Sat, 16 Sep 2017 11:58:47 +0000 (13:58 +0200)
committerJulien Cristau <jcristau@debian.org>
Sat, 16 Sep 2017 11:58:47 +0000 (13:58 +0200)
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");