aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding/can')
-rw-r--r--CAN-binder/low-can-binding/can/can-bus.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/can/can-bus.cpp b/CAN-binder/low-can-binding/can/can-bus.cpp
index 0de8aeb6..5f45624d 100644
--- a/CAN-binder/low-can-binding/can/can-bus.cpp
+++ b/CAN-binder/low-can-binding/can/can-bus.cpp
@@ -80,7 +80,9 @@ int can_bus_t::can_reader()
{
can_message_t msg;
s.second->get_socket() >> msg;
- push_new_can_message(msg);
+ std::lock_guard<std::mutex> can_message_lock(get_can_message_mutex());
+ { push_new_can_message(msg); }
+ get_new_can_message_cv().notify_one();
}
}
}