From: Ralf Ertzinger Date: Fri, 21 Dec 2012 14:02:01 +0000 (+0100) Subject: Set timeout for URL shortener to 5 seconds X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=f092ead6902305e6630adaa6197d551a5c537d20 Set timeout for URL shortener to 5 seconds --- diff --git a/videosite.pl b/videosite.pl index d7a549f..6ea4892 100644 --- a/videosite.pl +++ b/videosite.pl @@ -176,7 +176,7 @@ sub expand_url_shortener { 'shar\.es/[[:alnum:]]+', 'goo\.gl/[[:alnum:]]+', ); - my $ua = LWP::UserAgent->new(agent => 'Mozilla', max_redirect => 0); + my $ua = LWP::UserAgent->new(agent => 'Mozilla', max_redirect => 0, timeout => 5); my $i = 10; OUTER: while (($os ne $s) and ($i > 0)) {