mirror of https://github.com/mikaku/Monitorix.git
Fixed in 'icecast' to show an error message when Monitorix is unable to connect to the Icecast server
This commit is contained in:
parent
6789db5a07
commit
0ac6b46d22
|
@ -149,9 +149,13 @@ sub icecast_update {
|
|||
foreach(my @il = split(',', $icecast->{list})) {
|
||||
my $ils = trim($il[$e]);
|
||||
my $ua = LWP::UserAgent->new(timeout => 30);
|
||||
my $response = $ua->request(HTTP::Request->new('GET', trim($_)));
|
||||
my $response = $ua->request(HTTP::Request->new('GET', trim($ils)));
|
||||
my $data = $response->content;
|
||||
|
||||
if(!$response->is_success) {
|
||||
logger("$myself: ERROR: Unable to connect to '$ils'.");
|
||||
}
|
||||
|
||||
$data =~ s/\n//g;
|
||||
undef(@ls);
|
||||
undef(@br);
|
||||
|
|
Loading…
Reference in New Issue