Commit 755f8694 authored by Adrien Béraud's avatar Adrien Béraud Committed by Gerrit Code Review

socket_pair: avoid potential race condition

Refs #67228

Change-Id: Id74a19ab8dce01d132555840b05f3165cffb44af
parent 8face967
......@@ -36,8 +36,10 @@
#include <sys/socket.h>
#include <mutex>
#include <stdint.h>
#include <memory>
#include <atomic>
#include <cstdint>
namespace ring {
......@@ -99,7 +101,7 @@ class SocketPair {
socklen_t rtpDestAddrLen_;
sockaddr_storage rtcpDestAddr_;
socklen_t rtcpDestAddrLen_;
bool interrupted_ {false};
std::atomic_bool interrupted_ {false};
std::unique_ptr<SRTPProtoContext> srtpContext_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment