diff --git a/cmd/stdiscosrv/apisrv.go b/cmd/stdiscosrv/apisrv.go index 56806ffb2..0f39f5d1f 100644 --- a/cmd/stdiscosrv/apisrv.go +++ b/cmd/stdiscosrv/apisrv.go @@ -29,6 +29,7 @@ import ( "time" "github.com/syncthing/syncthing/lib/protocol" + "github.com/syncthing/syncthing/lib/stringutil" ) // announcement is the format received from and sent to clients @@ -440,6 +441,9 @@ func fixupAddresses(remote *net.TCPAddr, addresses []string) []string { fixed = append(fixed, uri.String()) } + // Remove duplicate addresses + fixed = stringutil.UniqueTrimmedStrings(fixed) + return fixed }