|
@@ -203,7 +203,6 @@ void PeerConnection::onGatheringStateChange(std::function<void(GatheringState st
|
|
|
|
|
|
shared_ptr<IceTransport> PeerConnection::initIceTransport(Description::Role role) {
|
|
shared_ptr<IceTransport> PeerConnection::initIceTransport(Description::Role role) {
|
|
try {
|
|
try {
|
|
- std::lock_guard lock(mInitMutex);
|
|
|
|
if (auto transport = std::atomic_load(&mIceTransport))
|
|
if (auto transport = std::atomic_load(&mIceTransport))
|
|
return transport;
|
|
return transport;
|
|
|
|
|
|
@@ -253,7 +252,6 @@ shared_ptr<IceTransport> PeerConnection::initIceTransport(Description::Role role
|
|
|
|
|
|
shared_ptr<DtlsTransport> PeerConnection::initDtlsTransport() {
|
|
shared_ptr<DtlsTransport> PeerConnection::initDtlsTransport() {
|
|
try {
|
|
try {
|
|
- std::lock_guard lock(mInitMutex);
|
|
|
|
if (auto transport = std::atomic_load(&mDtlsTransport))
|
|
if (auto transport = std::atomic_load(&mDtlsTransport))
|
|
return transport;
|
|
return transport;
|
|
|
|
|
|
@@ -287,7 +285,6 @@ shared_ptr<DtlsTransport> PeerConnection::initDtlsTransport() {
|
|
|
|
|
|
shared_ptr<SctpTransport> PeerConnection::initSctpTransport() {
|
|
shared_ptr<SctpTransport> PeerConnection::initSctpTransport() {
|
|
try {
|
|
try {
|
|
- std::lock_guard lock(mInitMutex);
|
|
|
|
if (auto transport = std::atomic_load(&mSctpTransport))
|
|
if (auto transport = std::atomic_load(&mSctpTransport))
|
|
return transport;
|
|
return transport;
|
|
|
|
|