mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-14 06:10:22 +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 {
|
||||
ldbs.tx.Put(key, value)
|
||||
return
|
||||
}
|
||||
wo := leveldb.NewWriteOptions()
|
||||
err = ldbs.backend.db.Put(wo, key, value)
|
||||
wo.Close()
|
||||
if err != nil {
|
||||
return
|
||||
} else {
|
||||
wo := leveldb.NewWriteOptions()
|
||||
err = ldbs.backend.db.Put(wo, key, value)
|
||||
wo.Close()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
// This technically too early because this is done in a transactions
|
||||
// which are commited (and possible fail) later.
|
||||
|
|
Loading…
Reference in New Issue
Block a user