diff --git a/lib/icecast.pm b/lib/icecast.pm index dd45164..69ac257 100644 --- a/lib/icecast.pm +++ b/lib/icecast.pm @@ -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);