fix closing of nodes iter channel

master
Oliver Tonnhofer 2013-11-08 15:03:20 +01:00
parent 129799328d
commit d7806c6cfd
1 changed files with 1 additions and 1 deletions

2
cache/nodes.go vendored
View File

@ -89,7 +89,7 @@ func (p *NodesCache) Iter() chan *element.Node {
// we need to Close the iter before closing the
// chan (and thus signaling that we are done)
// to avoid race where db is closed before the iterator
close(nodes)
defer close(nodes)
defer it.Close()
it.SeekToFirst()
for ; it.Valid(); it.Next() {