Error downgrading now uses a map<threadid, bool>, and error downgrading is canceled during message callbacks

This commit is contained in:
EricLiu2000
2019-07-29 15:16:35 -04:00
parent ff1e65b292
commit 54b98ec9b4
3 changed files with 19 additions and 5 deletions
@@ -113,11 +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) {
cb.second.callIfMatch(msg);
}
}
EventManager::GetInstance().downgradeErrorsOnCurrentThread();
}
}