diff --git a/leveldb.go b/leveldb.go index 58124d7..64cf1d5 100644 --- a/leveldb.go +++ b/leveldb.go @@ -169,7 +169,6 @@ func (ldbs *LevelDBSession) AllKeys(hash []byte) (keys chan []byte, n int, err e ldbs.backend.mutex.RUnlock() return } - it.Close() keys = make(chan []byte) @@ -177,7 +176,6 @@ func (ldbs *LevelDBSession) AllKeys(hash []byte) (keys chan []byte, n int, err e ldbs.backend.mutex.RUnlock() defer ro.Close() defer close(keys) - it := ldbs.backend.db.NewIterator(ro) defer it.Close() it.SeekToFirst() for ; it.Valid(); it.Next() {