mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
syncs: delete Map.Range, update callers to iterators
Updates #11038 Change-Id: I2819fed896cc4035aba5e4e141b52c12637373b1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
2cadb80fb2
commit
c763b7a7db
@@ -226,7 +226,7 @@ func (m *Manager) IncomingFiles() []ipn.PartialFile {
|
||||
// in JSON to clients. They distinguish between empty and non-nil
|
||||
// to know whether a Notify should be able about files.
|
||||
files := make([]ipn.PartialFile, 0)
|
||||
m.incomingFiles.Range(func(k incomingFileKey, f *incomingFile) bool {
|
||||
for k, f := range m.incomingFiles.All() {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
files = append(files, ipn.PartialFile{
|
||||
@@ -238,8 +238,7 @@ func (m *Manager) IncomingFiles() []ipn.PartialFile {
|
||||
FinalPath: f.finalPath,
|
||||
Done: f.done,
|
||||
})
|
||||
return true
|
||||
})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user