From 8e862032d1fb0a75dfc07de1f674fb61422b9f37 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 26 May 2021 01:32:52 +0300
Subject: [PATCH] SL-15292 waitForChannel crash #2

---
 indra/newview/llvoicevivox.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index f9c8da26a69..96b7dac59d8 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1326,6 +1326,11 @@ void LLVivoxVoiceClient::logoutOfVivox(bool wait)
 
                 result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult);
 
+                if (sShuttingDown)
+                {
+                    break;
+                }
+
                 LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;
                 // Don't get confused by prior queued events -- note that it's
                 // very important that mVivoxPump is an LLEventMailDrop, which
-- 
GitLab