mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
add lock to storage.write
This commit is contained in:
parent
a92138b61a
commit
f061fe047d
1 changed files with 3 additions and 0 deletions
|
@ -139,6 +139,9 @@ class WalletStorage(PrintError):
|
|||
self.data.pop(key)
|
||||
|
||||
def write(self):
|
||||
with self.lock: self._write()
|
||||
|
||||
def _write(self):
|
||||
if threading.currentThread().isDaemon():
|
||||
self.print_error('warning: daemon thread cannot write wallet')
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue