summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-08-14 15:22:15 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-08-14 15:22:15 -0700
commit661b6d12a0b4c249ca698f03e17a6ceeabde09c4 (patch)
treefd45b20d6b4dd72f5e3950c49020ab42e626ab23 /indra
parent8897ebeb6a0f1d96c7150385a01cb03cd0c43f50 (diff)
Don't call virtual functions in a derived class constructor
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoicewebrtc.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 84d1e767f8..919b541efe 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -2150,20 +2150,9 @@ LLVoiceWebRTCConnection::LLVoiceWebRTCConnection(const LLUUID &regionID, const s
mOutstandingRequests(0),
mChannelID(channelID),
mRegionID(regionID),
- mPrimary(false),
+ mPrimary(true),
mRetryWaitPeriod(0)
{
- if (isSpatial())
- {
- if (gAgent.getRegion())
- {
- mPrimary = (regionID == gAgent.getRegion()->getRegionID());
- }
- }
- else
- {
- mPrimary = true;
- }
// retries wait a short period...randomize it so
// all clients don't try to reconnect at once.
@@ -3065,6 +3054,10 @@ LLVoiceWebRTCSpatialConnection::LLVoiceWebRTCSpatialConnection(const LLUUID &reg
LLVoiceWebRTCConnection(regionID, channelID),
mParcelLocalID(parcelLocalID)
{
+ if (gAgent.getRegion())
+ {
+ mPrimary = (regionID == gAgent.getRegion()->getRegionID());
+ }
}
LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection()