1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #15207 from calavera/fix_index_locking

Remove read index that causes dead lock.
This commit is contained in:
David Calavera 2015-07-31 14:55:00 -07:00
commit 3e0b0c59e6

View file

@ -121,8 +121,6 @@ func (idx *TruncIndex) Get(s string) (string, error) {
// Iterate iterates over all stored IDs, and passes each of them to the given handler.
func (idx *TruncIndex) Iterate(handler func(id string)) {
idx.RLock()
defer idx.RUnlock()
idx.trie.Visit(func(prefix patricia.Prefix, item patricia.Item) error {
handler(string(prefix))
return nil