Skip to content

Commit

Permalink
lib/model: Remove superfluous check for IndexID in remote ClusterConf…
Browse files Browse the repository at this point in the history
…ig (#5717)

The check in ClusterConfig() when iterating through announced devices
in a folder explicitly skips entries without a non-zero IndexID.
Therefore, the check for IndexID == 0 just below will never be true
and the intended cleanup of local index data will not happen.

Plainly remove that check to make the intended case distinction work.
  • Loading branch information
acolomb authored and calmh committed May 12, 2019
1 parent ad44d77 commit e495635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
l.Infof("Device %v folder %s has mismatching index ID for us (%v != %v)", deviceID, folder.Description(), dev.IndexID, myIndexID)
startSequence = 0
}
} else if dev.ID == deviceID && dev.IndexID != 0 {
} else if dev.ID == deviceID {
// This is the other side's description of themselves. We
// check to see that it matches the IndexID we have on file,
// otherwise we drop our old index data and expect to get a
Expand Down

0 comments on commit e495635

Please sign in to comment.