From cec4c9aab779b575e98e37ade0ebb3a699fbd580 Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 25 Feb 2022 09:46:54 +0100 Subject: [PATCH] Use a 5 seconds timeout to remotely fetch HTML events source. --- html5_events/html5_events.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html5_events/html5_events.pl b/html5_events/html5_events.pl index b977544..20344f1 100644 --- a/html5_events/html5_events.pl +++ b/html5_events/html5_events.pl @@ -37,8 +37,9 @@ sub create_re { my $url = shift(@_); my $ua = LWP::UserAgent->new; + $ua->timeout(5); $ua->agent('Mozilla/5.0'); - $ua->ssl_opts('verify_hostname' => 0); + $ua->ssl_opts('verify_hostname' => 0); my $res = $ua->get($url); if ($res->is_success) {