mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-09-28 21:43:13 +02:00
refactor: Drop owns_lock()
call
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
@@ -165,10 +165,11 @@ private:
|
||||
bool TryEnter(const char* pszName, const char* pszFile, int nLine)
|
||||
{
|
||||
EnterCritical(pszName, pszFile, nLine, Base::mutex(), true);
|
||||
if (!Base::try_lock()) {
|
||||
LeaveCritical();
|
||||
if (Base::try_lock()) {
|
||||
return true;
|
||||
}
|
||||
return Base::owns_lock();
|
||||
LeaveCritical();
|
||||
return false;
|
||||
}
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user