Minor refactoring/fix of use of atomic_bool

This commit is contained in:
Stephen Seo 2020-01-05 15:12:13 +09:00
parent 5c8480e5bc
commit 1ecf9bff4f

View file

@ -288,7 +288,7 @@ void UDPC::Context::update_impl() {
{
unsigned char *sk = nullptr;
unsigned char *pk = nullptr;
if(keysSet.load()) {
if(keysSet.load(std::memory_order_relaxed)) {
sk = this->sk;
pk = this->pk;
}
@ -1206,7 +1206,7 @@ void UDPC::Context::update_impl() {
}
unsigned char *sk = nullptr;
unsigned char *pk = nullptr;
if(keysSet.load()) {
if(keysSet.load(std::memory_order_relaxed)) {
sk = this->sk;
pk = this->pk;
}