From 6eeb457fc21bf3997dd017ae6105c13b037565bf Mon Sep 17 00:00:00 2001 From: Samuel Smith Date: Mon, 8 Aug 2016 21:59:01 -0500 Subject: [PATCH] Use longer timeout. --- plugins/network/modem-nvg510 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/network/modem-nvg510 b/plugins/network/modem-nvg510 index 5b3b1791..00f7ca78 100755 --- a/plugins/network/modem-nvg510 +++ b/plugins/network/modem-nvg510 @@ -51,7 +51,7 @@ use constant { if(defined $ARGV[0] and $ARGV[0] eq 'autoconf'){ my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha"; - my $html = HTTP::Tiny->new(timeout => 1 )->get($url); + my $html = HTTP::Tiny->new(timeout => 30 )->get($url); if($html->{success} && $html->{content} =~ m{Broadband Status}){ print "yes\n"; @@ -159,7 +159,7 @@ lof_up.min 0 ########################## MAIN ############################# my $url = $ENV{url} || "http://192.168.1.254/cgi-bin/dslstatistics.ha"; -my $html = HTTP::Tiny->new(timeout => 1 )->get($url); +my $html = HTTP::Tiny->new(timeout => 30 )->get($url); die "Couldn't fetch $url" unless $html->{success}; my @stats = $html->{content} =~ m{(.*?)}sg;