Commit 8df999fa authored by Erick Hitter's avatar Erick Hitter
Browse files

Randomize multisite order so that large networks don't favor early sites

parent ef7d2258
......@@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"path/filepath"
"math/rand"
"time"
)
......@@ -175,6 +176,12 @@ func getMultisiteSites() ([]Site, error) {
return make([]Site, 0), err
}
// Shuffle site order so that none are favored
for i := range jsonRes {
j := rand.Intn(i + 1)
jsonRes[i], jsonRes[j] = jsonRes[j], jsonRes[i]
}
return jsonRes, nil
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment