diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-05-03 14:50:54 +0300 | 
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-05-03 14:50:54 +0300 | 
| commit | e650069a4461db97b449797be0f300ecf5cad549 (patch) | |
| tree | 180ed1b05a6d860941f732ee76b534aad747c4c1 /indra | |
| parent | 99ab1ccf9365bc74eec7503c21c904b6317f0af0 (diff) | |
SL-11058 Better delay logic
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvoicevivox.cpp | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 2584f4b9a4..ae4b065333 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -658,6 +658,8 @@ void LLVivoxVoiceClient::voiceControlCoro()      mIsCoroutineActive = true;      LLCoros::set_consuming(true); +    U32 retry = 0; +      while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)      {          LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL; @@ -678,6 +680,7 @@ void LLVivoxVoiceClient::voiceControlCoro()              LL_DEBUGS("Voice") << "lost channel RelogRequested=" << mRelogRequested << LL_ENDL;                          endAndDisconnectSession(); +            retry = 0;          }          // if we hit this and mRelogRequested is true, that indicates @@ -693,10 +696,16 @@ void LLVivoxVoiceClient::voiceControlCoro()              if (!success)              {                  // We failed to connect, give it a bit time before retrying. -                llcoro::suspendUntilTimeout(5.0); +                retry++; +                F32 delay = llmin(5.f * (F32)retry, 60.f); +                llcoro::suspendUntilTimeout(delay); +                LL_INFOS("Voice") << "Voice failed to establish session after " << retry << " tries. Will attempt to reconnect." << LL_ENDL; +            } +            else +            { +                LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL;              } -            LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL;              while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)              {                  LL_INFOS("Voice") << "waiting for SLVoice to exit" << LL_ENDL; | 
