Skip to content
Snippets Groups Projects
Commit 755f8694 authored by Adrien Béraud's avatar Adrien Béraud Committed by Gerrit Code Review
Browse files

socket_pair: avoid potential race condition

Refs #67228

Change-Id: Id74a19ab8dce01d132555840b05f3165cffb44af
parent 8face967
Branches
Tags
No related merge requests found
......@@ -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_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment