diff --git a/src/cpp/rtps/reader/WriterProxy.h b/src/cpp/rtps/reader/WriterProxy.h index bbbb37abd6a..1bb88fde67c 100644 --- a/src/cpp/rtps/reader/WriterProxy.h +++ b/src/cpp/rtps/reader/WriterProxy.h @@ -371,7 +371,7 @@ class WriterProxy : public RTPSMessageSenderInterface //! Timed event to send initial acknack. TimedEvent* initial_acknack_; //! Last Heartbeatcount. - uint32_t last_heartbeat_count_; + std::atomic last_heartbeat_count_; //!Indicates if the heartbeat has the final flag set. std::atomic heartbeat_final_flag_; //!Is the writer alive