livoxProto1:Device: Spinlock guard heartbeat stop() for races
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <boost/asio/posix/stream_descriptor.hpp>
|
||||
#include "protocol.h"
|
||||
#include <callback.h>
|
||||
#include <spinLock.h>
|
||||
|
||||
// Custom hash function for std::pair<uint8_t, uint8_t>
|
||||
namespace std {
|
||||
@@ -162,6 +163,7 @@ public:
|
||||
// Heartbeat state
|
||||
std::unique_ptr<boost::asio::deadline_timer> heartbeatTimer;
|
||||
std::atomic<bool> heartbeatActive;
|
||||
smo::SpinLock heartbeatActiveLock;
|
||||
|
||||
// Point cloud data state
|
||||
std::atomic<bool> pcloudDataActive;
|
||||
|
||||
Reference in New Issue
Block a user