Use a 5 seconds timeout to remotely fetch HTML events source.
This commit is contained in:
parent
6ed38920bd
commit
cec4c9aab7
|
@ -37,8 +37,9 @@ sub create_re
|
||||||
{
|
{
|
||||||
my $url = shift(@_);
|
my $url = shift(@_);
|
||||||
my $ua = LWP::UserAgent->new;
|
my $ua = LWP::UserAgent->new;
|
||||||
|
$ua->timeout(5);
|
||||||
$ua->agent('Mozilla/5.0');
|
$ua->agent('Mozilla/5.0');
|
||||||
$ua->ssl_opts('verify_hostname' => 0);
|
$ua->ssl_opts('verify_hostname' => 0);
|
||||||
my $res = $ua->get($url);
|
my $res = $ua->get($url);
|
||||||
if ($res->is_success)
|
if ($res->is_success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue