diff options
Diffstat (limited to 'libtransport/src/hicn/transport/protocols/protocol.h')
-rw-r--r-- | libtransport/src/hicn/transport/protocols/protocol.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libtransport/src/hicn/transport/protocols/protocol.h b/libtransport/src/hicn/transport/protocols/protocol.h index 88889bb8c..e4821b6a0 100644 --- a/libtransport/src/hicn/transport/protocols/protocol.h +++ b/libtransport/src/hicn/transport/protocols/protocol.h @@ -15,6 +15,8 @@ #pragma once +#include <atomic> + #include <hicn/transport/interfaces/socket.h> #include <hicn/transport/protocols/packet_manager.h> #include <hicn/transport/protocols/statistics.h> @@ -60,7 +62,9 @@ class TransportProtocol : public interface::BasePortal::ConsumerCallback, protected: interface::ConsumerSocket *socket_; std::shared_ptr<interface::BasePortal> portal_; - volatile bool is_running_; + std::atomic<bool> is_running_; + // True if it si the first time we schedule an interest + std::atomic<bool> is_first_; TransportStatistics stats_; }; |