From: Julien Cristau Date: Sat, 16 Sep 2017 11:58:47 +0000 (+0200) Subject: Set LWP::UserAgent timeout in dsa-check-mirrorsync X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-nagios.git;a=commitdiff_plain;h=6b23f07c2d4436cb8de3f7925f8419212d07f738 Set LWP::UserAgent timeout in dsa-check-mirrorsync --- diff --git a/dsa-nagios-checks/checks/dsa-check-mirrorsync b/dsa-nagios-checks/checks/dsa-check-mirrorsync index 8e8ec08..5a45e0c 100755 --- a/dsa-nagios-checks/checks/dsa-check-mirrorsync +++ b/dsa-nagios-checks/checks/dsa-check-mirrorsync @@ -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");