summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2021-12-13 10:21:08 +0000
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2021-12-13 10:21:08 +0000
commit15e91c8f8abf52183bd7bae7d1beec5b6db7f844 (patch)
treea40f0f2a13a484b7bcf7578ad08f47aa5865a1ab /indra/newview
parentc948034be9c28d6e213c9f1f764a6fc39c0c7691 (diff)
SL-16496 Added the retry counter for Vivox daemon connect
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicevivox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 2dddf1a5ef..7a034022ea 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -89,6 +89,7 @@ namespace {
// Don't retry connecting to the daemon more frequently than this:
const F32 DAEMON_CONNECT_THROTTLE_SECONDS = 1.0f;
+ const int DAEMON_CONNECT_RETRY_MAX = 3;
// Don't send positional updates more frequently than this:
const F32 UPDATE_THROTTLE_SECONDS = 0.5f;
@@ -1044,8 +1045,9 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
LL_DEBUGS("Voice") << "Connecting to vivox daemon:" << mDaemonHost << LL_ENDL;
+ int retryCount(0);
LLVoiceVivoxStats::getInstance()->reset();
- while (!mConnected && !sShuttingDown)
+ while (!mConnected && !sShuttingDown && retryCount++ <= DAEMON_CONNECT_RETRY_MAX)
{
LLVoiceVivoxStats::getInstance()->connectionAttemptStart();
LL_DEBUGS("Voice") << "Attempting to connect to vivox daemon: " << mDaemonHost << LL_ENDL;
@@ -1171,7 +1173,7 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
{
provisioned = true;
}
- } while (!provisioned && retryCount <= PROVISION_RETRY_MAX && !sShuttingDown);
+ } while (!provisioned && ++retryCount <= PROVISION_RETRY_MAX && !sShuttingDown);
if (sShuttingDown && !provisioned)
{