Reordered error downgrading, order of going offline, and renamed locks

This commit is contained in:
EricLiu2000
2019-08-06 10:32:19 -04:00
parent 01c62b6445
commit 3358241abe
5 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -113,14 +113,14 @@ void MultiChannelCommunication::readTask() {
continue;
}
// We want callbacks to be able to access errors
EventManager::GetInstance().cancelErrorDowngradingOnCurrentThread();
for(auto& cb : messageCallbacks) { // We might have closed while reading or processing
if(!closing) {
// We want callbacks to be able to access errors
EventManager::GetInstance().cancelErrorDowngradingOnCurrentThread();
cb.second.callIfMatch(msg);
EventManager::GetInstance().downgradeErrorsOnCurrentThread();
}
}
EventManager::GetInstance().downgradeErrorsOnCurrentThread();
}
}