From 0b75a85adc951f9d0e0e42fbece54d83e078395e Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Fri, 29 Jan 2021 03:35:13 +0800 Subject: [PATCH] Panda: use 'std::atomic connected' to ensure thread-safety (#19954) --- selfdrive/boardd/panda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/boardd/panda.h b/selfdrive/boardd/panda.h index f5c2f83af6..b1f5e70879 100644 --- a/selfdrive/boardd/panda.h +++ b/selfdrive/boardd/panda.h @@ -52,7 +52,7 @@ class Panda { Panda(); ~Panda(); - bool connected = true; + std::atomic connected = true; cereal::HealthData::HwType hw_type = cereal::HealthData::HwType::UNKNOWN; bool is_pigeon = false; bool has_rtc = false;