Skip to content

Commit 4358600

Browse files
committed
squash w/ 311
1 parent c36fcae commit 4358600

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

core/src/process_stash.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ namespace irods::http::process_stash
5454

5555
auto visit(const std::string& _key, const std::function<void(boost::any&)>& _visitor) -> bool
5656
{
57-
std::shared_lock read_lock{g_mtx};
58-
if (g_stash.find(_key) != std::end(g_stash)) {
59-
read_lock.unlock();
60-
std::lock_guard write_lock{g_mtx};
61-
if (auto iter = g_stash.find(_key); iter != std::end(g_stash)) {
62-
_visitor(iter->second);
63-
return true;
64-
}
57+
std::lock_guard write_lock{g_mtx};
58+
if (auto iter = g_stash.find(_key); iter != std::end(g_stash)) {
59+
_visitor(iter->second);
60+
return true;
6561
}
6662

6763
return false;

0 commit comments

Comments
 (0)