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

@@ -9,7 +9,6 @@ package model
import (
"bytes"
"fmt"
"math/rand"
"path/filepath"
"runtime"
"sort"
@@ -25,6 +24,7 @@ import (
"github.com/syncthing/syncthing/lib/ignore"
"github.com/syncthing/syncthing/lib/osutil"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/rand"
"github.com/syncthing/syncthing/lib/scanner"
"github.com/syncthing/syncthing/lib/sha256"
"github.com/syncthing/syncthing/lib/sync"
@@ -1089,10 +1089,7 @@ func (f *sendReceiveFolder) handleFile(file protocol.FileInfo, copyChan chan<- c
}
// Shuffle the blocks
for i := range blocks {
j := rand.Intn(i + 1)
blocks[i], blocks[j] = blocks[j], blocks[i]
}
rand.Shuffle(blocks)
events.Default.Log(events.ItemStarted, map[string]string{
"folder": f.folderID,