Tick version clock on received changes.

This commit is contained in:
Jakob Borg 2014-07-18 11:41:51 +02:00
parent 884bb638bc
commit 74fd4a3722

View File

@ -338,6 +338,10 @@ func (m *Model) Index(nodeID protocol.NodeID, repo string, fs []protocol.FileInf
return return
} }
for i := range fs {
lamport.Default.Tick(fs[i].Version)
}
m.rmut.RLock() m.rmut.RLock()
r, ok := m.repoFiles[repo] r, ok := m.repoFiles[repo]
m.rmut.RUnlock() m.rmut.RUnlock()
@ -367,6 +371,10 @@ func (m *Model) IndexUpdate(nodeID protocol.NodeID, repo string, fs []protocol.F
return return
} }
for i := range fs {
lamport.Default.Tick(fs[i].Version)
}
m.rmut.RLock() m.rmut.RLock()
r, ok := m.repoFiles[repo] r, ok := m.repoFiles[repo]
m.rmut.RUnlock() m.rmut.RUnlock()