From 9499aa23156007dacac1b5a8faea2ea97fccfe3c Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 30 Oct 2013 20:53:50 +0000 Subject: [PATCH] Update mkgeo to use LWP::UserAgent::Determined + set fair timeout --- bin/mkgeo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mkgeo b/bin/mkgeo index 4dceb1d..a732711 100755 --- a/bin/mkgeo +++ b/bin/mkgeo @@ -6,7 +6,7 @@ use warnings; use IO::File; use Math::Trig qw(deg2rad pip2 great_circle_distance); use JSON::XS; -use LWP::UserAgent; +use LWP::UserAgent::Determined; use YAML; my $originfile = shift @ARGV; @@ -75,7 +75,8 @@ foreach my $server (@servers) # If pingdom support is enabled then check which servers are up if ($ENV{PINGDOM_USERNAME} && $ENV{PINGDOM_PASSWORD}) { - my $ua = LWP::UserAgent->new; + my $ua = LWP::UserAgent::Determined->new; + $ua->timeout(15); $ua->default_header("App-Key", "2cohi62u5haxvqmypk3ljqqrze1jufrh"); $ua->credentials("api.pingdom.com:443", "Pingdom API", $ENV{PINGDOM_USERNAME}, $ENV{PINGDOM_PASSWORD}); -- 2.39.5