Compare commits

...

1 Commits

Author SHA1 Message Date
Jakob Borg
9bb5988b4e lib/model: Don't deadlock when returning temp index block counts
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3194
2016-05-26 09:16:08 +00:00

View File

@@ -140,12 +140,13 @@ func (t *deviceDownloadState) GetBlockCounts(folder string) map[string]int {
}
t.mut.RLock()
defer t.mut.RUnlock()
for name, state := range t.folders {
if name == folder {
return state.GetBlockCounts()
}
}
t.mut.RUnlock()
return nil
}