mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 03:48:26 +00:00
0941ce76b7
When cap(permanentRelays) >= len(permanentRelays) + len(knownRelays), append(permanentRelays, knownRelays...) returns a slice of the array underlying permanentRelays. The subsequent rand.Shuffle then mixes the permanent and known relays. Sequential requests may cause strelaypoolsrv to forget its permanent relays. Worse, concurrent requests may cause shuffling of the same slice on multiple processors concurrently. Co-authored-by: greatroar <@>