summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/generate-mirror-mail.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/generate-mirror-mail.pl b/bin/generate-mirror-mail.pl
index c6e8a19..175b8b2 100755
--- a/bin/generate-mirror-mail.pl
+++ b/bin/generate-mirror-mail.pl
@@ -8,6 +8,7 @@ use Date::Parse;
use File::Basename;
use HTTP::Cookies;
use JSON;
+use List::Util qw(uniq);
use Text::Template;
use Try::Tiny;
use WWW::Mechanize;
@@ -197,7 +198,7 @@ while (<STDIN>) {
mail_from_name => $Config->{misc}->{name} // die "misc.name not set in config",
);
- my @protocols = map {${$_}{protocol}} @connection_failed;
+ my @protocols = uniq map {${$_}{protocol}} @connection_failed;
my @active_urls = grep { $_->{active} } @{$json->{urls}};
if (scalar(@protocols) != scalar(@active_urls)) {
$values{connection_failed}->{protocols} = \@protocols;