mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 01:10:17 +01:00
Removed another defer.
This commit is contained in:
parent
913ae0d2c7
commit
eabcd53f6b
@ -41,10 +41,11 @@ func (ldb *LevelDBBackend) Shutdown() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ldb *LevelDBBackend) Fetch(hash, key []byte) ([]byte, error) {
|
||||
func (ldb *LevelDBBackend) Fetch(hash, key []byte) (value []byte, err error) {
|
||||
ro := leveldb.NewReadOptions()
|
||||
defer ro.Close()
|
||||
return ldb.db.Get(ro, key)
|
||||
value, err = ldb.db.Get(ro, key)
|
||||
ro.Close()
|
||||
return
|
||||
}
|
||||
|
||||
func (ldb *LevelDBBackend) InTransaction() bool {
|
||||
|
Loading…
Reference in New Issue
Block a user