From 17d27331a3329c10f1aa38a409f451402fb770aa Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 7 May 2020 17:14:32 +0100 Subject: [PATCH] Fix 'input to Unique() must be sorted' panic --- federationsender/internal/perform.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/federationsender/internal/perform.go b/federationsender/internal/perform.go index 431b2a2d3..7c5fa73fc 100644 --- a/federationsender/internal/perform.go +++ b/federationsender/internal/perform.go @@ -47,7 +47,7 @@ func (r *FederationSenderInternalAPI) PerformJoin( } // Deduplicate the server names we were provided. - util.Unique(request.ServerNames) + util.SortAndUnique(request.ServerNames) // Try each server that we were provided until we land on one that // successfully completes the make-join send-join dance. @@ -159,7 +159,7 @@ func (r *FederationSenderInternalAPI) PerformLeave( response *api.PerformLeaveResponse, ) (err error) { // Deduplicate the server names we were provided. - util.Unique(request.ServerNames) + util.SortAndUnique(request.ServerNames) // Try each server that we were provided until we land on one that // successfully completes the make-leave send-leave dance.