mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 11:05:45 +00:00
taildrop: fix defer in loop (#13757)
However, this affects the scope of a defer. Updates #11038 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
parent
5b7303817e
commit
52ef27ab7c
@ -228,7 +228,6 @@ func (m *Manager) IncomingFiles() []ipn.PartialFile {
|
||||
files := make([]ipn.PartialFile, 0)
|
||||
for k, f := range m.incomingFiles.All() {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
files = append(files, ipn.PartialFile{
|
||||
Name: k.name,
|
||||
Started: f.started,
|
||||
@ -238,6 +237,7 @@ func (m *Manager) IncomingFiles() []ipn.PartialFile {
|
||||
FinalPath: f.finalPath,
|
||||
Done: f.done,
|
||||
})
|
||||
f.mu.Unlock()
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user