mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Fix locking screwup
This commit is contained in:
parent
3388d5b49c
commit
884bb638bc
@ -346,7 +346,6 @@ func (m *Model) Index(nodeID protocol.NodeID, repo string, fs []protocol.FileInf
|
||||
} else {
|
||||
l.Fatalf("Index for nonexistant repo %q", repo)
|
||||
}
|
||||
m.rmut.RUnlock()
|
||||
|
||||
events.Default.Log(events.RemoteIndexUpdated, map[string]interface{}{
|
||||
"node": nodeID.String(),
|
||||
@ -371,13 +370,11 @@ func (m *Model) IndexUpdate(nodeID protocol.NodeID, repo string, fs []protocol.F
|
||||
m.rmut.RLock()
|
||||
r, ok := m.repoFiles[repo]
|
||||
m.rmut.RUnlock()
|
||||
m.rmut.RLock()
|
||||
if ok {
|
||||
r.Update(nodeID, fs)
|
||||
} else {
|
||||
l.Fatalf("IndexUpdate for nonexistant repo %q", repo)
|
||||
}
|
||||
m.rmut.RUnlock()
|
||||
|
||||
events.Default.Log(events.RemoteIndexUpdated, map[string]interface{}{
|
||||
"node": nodeID.String(),
|
||||
|
Loading…
Reference in New Issue
Block a user