diff --git a/store/v2/db/pebbledb.go b/store/v2/db/pebbledb.go index e6f4d67a97bd..62f35b47e485 100644 --- a/store/v2/db/pebbledb.go +++ b/store/v2/db/pebbledb.go @@ -228,6 +228,9 @@ func (itr *pebbleDBIterator) Error() error { } func (itr *pebbleDBIterator) Close() error { + if itr.source == nil { + return nil + } err := itr.source.Close() itr.source = nil itr.valid = false