mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 01:10:17 +01:00
Fixed problem raised from the removal of the doWrite closure.
This commit is contained in:
parent
e4ad3a84d8
commit
54a4527fda
@ -190,12 +190,13 @@ func (ldbs *LevelDBSession) Store(hash, key, value []byte) (exists bool, err err
|
|||||||
if ldbs.tx != nil {
|
if ldbs.tx != nil {
|
||||||
ldbs.tx.Put(key, value)
|
ldbs.tx.Put(key, value)
|
||||||
return
|
return
|
||||||
}
|
} else {
|
||||||
wo := leveldb.NewWriteOptions()
|
wo := leveldb.NewWriteOptions()
|
||||||
err = ldbs.backend.db.Put(wo, key, value)
|
err = ldbs.backend.db.Put(wo, key, value)
|
||||||
wo.Close()
|
wo.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// This technically too early because this is done in a transactions
|
// This technically too early because this is done in a transactions
|
||||||
// which are commited (and possible fail) later.
|
// which are commited (and possible fail) later.
|
||||||
|
Loading…
Reference in New Issue
Block a user