lib/connections: Add QUIC protocol support (fixes #5377) (#5737)

This commit is contained in:
Audrius Butkevicius
2019-05-29 08:56:40 +01:00
committed by Jakob Borg
parent d8fa61e27c
commit e714df013f
32 changed files with 1290 additions and 128 deletions

View File

@@ -7,10 +7,10 @@
package model
import (
"math/rand"
"sort"
"time"
"github.com/syncthing/syncthing/lib/rand"
"github.com/syncthing/syncthing/lib/sync"
)
@@ -103,11 +103,7 @@ func (q *jobQueue) Shuffle() {
q.mut.Lock()
defer q.mut.Unlock()
l := len(q.queued)
for i := range q.queued {
r := rand.Intn(l)
q.queued[i], q.queued[r] = q.queued[r], q.queued[i]
}
rand.Shuffle(q.queued)
}
func (q *jobQueue) Reset() {