Commits

Palmer, 2E0EOL committed 8634466 Draft

Handle connection refused and similar errors reading the stream.

  • Participants
  • Parent commits 00fd654
  • Branches develop

Comments (0)

Files changed (1)

 	my @entries = ( );
 	my ( $Feeds, $Url, $Name ) = @_;
 	my $feed = XML::Feed->parse(URI->new($Url));
+	if ( !$feed ) {
+		printf(STDERR "Stream %s error: %s\n", $Name, $@);
+		return @entries;
+	}
+
 	foreach my $entry ($feed->entries) {
 		my $enclosure = $entry->{'entry'}->{'enclosure'};
 		my $uriDecoded = uri_unescape($enclosure->{'url'});