mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
wallet: Close wallet env lock file
Close .walletlock file when a BerkeleyEnvironment is deleted.
This commit is contained in:
parent
8602a1e6ae
commit
2f8b8f479b
3 changed files with 9 additions and 0 deletions
|
|
@ -116,6 +116,12 @@ bool LockDirectory(const fs::path& directory, const std::string lockfile_name, b
|
|||
return true;
|
||||
}
|
||||
|
||||
void UnlockDirectory(const fs::path& directory, const std::string& lockfile_name)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(cs_dir_locks);
|
||||
dir_locks.erase((directory / lockfile_name).string());
|
||||
}
|
||||
|
||||
void ReleaseDirectoryLocks()
|
||||
{
|
||||
std::lock_guard<std::mutex> ulock(cs_dir_locks);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue