From 219944d14e4c08bf6291f792b2b37b99362812f2 Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Thu, 2 May 2019 18:34:06 +0300
Subject: [PATCH] SL-11058 Viewer "Voice is down" dialogs can stack up

---
 indra/newview/llvoicevivox.cpp                       | 9 ++++++++-
 indra/newview/skins/default/xui/en/notifications.xml | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 2231bda33e4..2584f4b9a49 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -666,7 +666,8 @@ void LLVivoxVoiceClient::voiceControlCoro()
 
     do
     {
-        if (startAndConnectSession())
+        bool success = startAndConnectSession();
+        if (success)
         {
             if (mTuningMode)
             {
@@ -689,6 +690,12 @@ void LLVivoxVoiceClient::voiceControlCoro()
             << LL_ENDL;            
         if (mRelogRequested)
         {
+            if (!success)
+            {
+                // We failed to connect, give it a bit time before retrying.
+                llcoro::suspendUntilTimeout(5.0);
+            }
+
             LL_INFOS("Voice") << "will attempt to reconnect to voice" << LL_ENDL;
             while (isGatewayRunning() || gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
             {
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 77db71d5369..053c0418497 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8632,6 +8632,7 @@ Please check your network and firewall setup.
    icon="alertmodal.tga"
    name="NoVoiceConnect"
    type="alertmodal">
+    <unique/>
 We are unable to connect to the voice server:
 
 [HOSTID]
-- 
GitLab