lib/model: Discard download progress upon receiving an index update (fixes #2993)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3023
This commit is contained in:
committed by
Jakob Borg
parent
49387f9494
commit
29fa05ae05
@@ -97,6 +97,9 @@ type deviceDownloadState struct {
|
||||
// Update updates internal state of what has been downloaded into the temporary
|
||||
// files by the remote device for this specific folder.
|
||||
func (t *deviceDownloadState) Update(folder string, updates []protocol.FileDownloadProgressUpdate) {
|
||||
if t == nil {
|
||||
return
|
||||
}
|
||||
t.mut.RLock()
|
||||
f, ok := t.folders[folder]
|
||||
t.mut.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user