summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-10-24 15:59:00 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-10-24 15:59:00 -0700
commite0a76080b52df77af0c09c3eeb20fff7ddb064c3 (patch)
tree06f62eee00c6ac83db12da960dfeeffaf2bf1296 /indra/newview
parent12ea8e4f7252029d97b0dfdd9e67d4e744ad375f (diff)
Have to use a coro for now, due to a http call.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index a725bcf034..52ed393da9 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -257,6 +257,7 @@ void LLWebRTCVoiceClient::cleanupSingleton()
mNextSession->shutdownAllConnections();
}
cleanUp();
+ stopTimer();
sessionState::clearSessions();
}
@@ -295,7 +296,6 @@ void LLWebRTCVoiceClient::cleanUp()
mNeighboringRegions.clear();
sessionState::for_each(boost::bind(predShutdownSession, _1));
LL_DEBUGS("Voice") << "Exiting" << LL_ENDL;
- stopTimer();
}
void LLWebRTCVoiceClient::stopTimer()
@@ -2478,7 +2478,7 @@ void LLVoiceWebRTCConnection::sendData(const std::string &data)
// Tell the simulator that we're shutting down a voice connection.
// The simulator will pass this on to the Secondlife WebRTC server.
-void LLVoiceWebRTCConnection::breakVoiceConnection(connectionPtr_t connection)
+void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connection)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
@@ -2518,7 +2518,7 @@ void LLVoiceWebRTCConnection::breakVoiceConnection(connectionPtr_t connection)
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnection",
+ new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnectionCoro",
LLCore::HttpRequest::DEFAULT_POLICY_ID));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
@@ -2820,7 +2820,9 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
if (!LLWebRTCVoiceClient::isShuttingDown())
{
mOutstandingRequests++;
- breakVoiceConnection(this->shared_from_this());
+ setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT);
+ LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::breakVoiceConnectionCoro",
+ boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this->shared_from_this()));
}
else
{