mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Do not clear validationinterface entries being executed
The previous code for MainSignalsInstance::Clear would decrement the reference count of every interface, including ones that were already Unregister()ed but still being executed.
This commit is contained in:
parent
1b151e3ffc
commit
3c61abbbc8
1 changed files with 2 additions and 2 deletions
|
@ -67,8 +67,8 @@ public:
|
|||
void Clear()
|
||||
{
|
||||
LOCK(m_mutex);
|
||||
for (auto it = m_list.begin(); it != m_list.end();) {
|
||||
it = --it->count ? std::next(it) : m_list.erase(it);
|
||||
for (const auto& entry : m_map) {
|
||||
if (!--entry.second->count) m_list.erase(entry.second);
|
||||
}
|
||||
m_map.clear();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue