summaryrefslogtreecommitdiff
path: root/indra/llwebrtc
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp31
-rw-r--r--indra/llwebrtc/llwebrtc.h2
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h2
3 files changed, 20 insertions, 15 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index adde174a74..74af16679a 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -649,21 +649,26 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection()
return true;
}
-void LLWebRTCPeerConnectionImpl::shutdownConnection()
+bool LLWebRTCPeerConnectionImpl::shutdownConnection()
{
- mWebRTCImpl->PostSignalingTask(
- [this]()
- {
- if (mPeerConnection)
- {
- mPeerConnection->Close();
- mPeerConnection = nullptr;
- }
- for (auto &observer : mSignalingObserverList)
+ if (mPeerConnection)
+ {
+ mWebRTCImpl->PostSignalingTask(
+ [this]()
{
- observer->OnPeerShutDown();
- }
- });
+ if (mPeerConnection)
+ {
+ mPeerConnection->Close();
+ mPeerConnection = nullptr;
+ }
+ for (auto &observer : mSignalingObserverList)
+ {
+ observer->OnPeerShutDown();
+ }
+ });
+ return true;
+ }
+ return false;
}
void LLWebRTCPeerConnectionImpl::enableSenderTracks(bool enable)
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index e7effdfbb8..7743ac7ba0 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -138,7 +138,7 @@ class LLWebRTCPeerConnection
virtual void unsetSignalingObserver(LLWebRTCSignalingObserver* observer) = 0;
virtual bool initializeConnection() = 0;
- virtual void shutdownConnection() = 0;
+ virtual bool shutdownConnection() = 0;
virtual void AnswerAvailable(const std::string &sdp) = 0;
};
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 7146267379..3c182c4b02 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -248,7 +248,7 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnection,
void setSignalingObserver(LLWebRTCSignalingObserver *observer) override;
void unsetSignalingObserver(LLWebRTCSignalingObserver *observer) override;
bool initializeConnection() override;
- void shutdownConnection() override;
+ bool shutdownConnection() override;
void AnswerAvailable(const std::string &sdp) override;
//