mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-01-11 09:20:17 +01:00
Use write lock when executing block deletion.
This commit is contained in:
parent
d6ddd047a4
commit
6b5f791a8a
@ -144,7 +144,7 @@ func (ldbs *LevelDBSession) Del(hash, key []byte) (success bool, err error) {
|
|||||||
if key, err = ldbs.backend.decoder(key); err != nil {
|
if key, err = ldbs.backend.decoder(key); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ldbs.backend.doRead(func(db *leveldb.DB) {
|
ldbs.backend.doWrite(func(db *leveldb.DB) {
|
||||||
ro := leveldb.NewReadOptions()
|
ro := leveldb.NewReadOptions()
|
||||||
defer ro.Close()
|
defer ro.Close()
|
||||||
var data []byte
|
var data []byte
|
||||||
|
Loading…
Reference in New Issue
Block a user