mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07:00
lib/model: Don't deadlock when returning temp index block counts
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3194
This commit is contained in:
parent
c513171014
commit
9bb5988b4e
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user