Skip to content

Commit

Permalink
another
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 committed Jan 28, 2024
1 parent 52e6fab commit 9e6ad2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bcos-scheduler/src/SchedulerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void SchedulerImpl::commitBlock(bcos::protocol::BlockHeader::Ptr header,
std::shared_ptr<std::unique_lock<std::mutex>> commitLock =
std::make_shared<std::unique_lock<std::mutex>>(m_commitMutex, std::try_to_lock);

if (!commitLock->try_lock_for(std::chrono::seconds(1)))
if (!commitLock->owns_lock() || !commitLock->try_lock_for(std::chrono::seconds(1)))
{
std::string message =
(boost::format("commitBlock: Another block is committing! Block to commit "
Expand Down

0 comments on commit 9e6ad2e

Please sign in to comment.