summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-10-19 16:44:09 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-10-19 16:44:09 -0700
commit2a2256e8b06dfcefa10f32bf2c6775df19dfc782 (patch)
tree4bdd7771e901cf3a28d55cff432ccd809fd79793 /indra
parenta2009170c92ecb56cf304447dbedfeef74272c0d (diff)
Fix for EXP-201 -- "Clean shutdown"
Reviewed by Brad and Mani.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index ca2503c447..d658ad5c0e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2909,6 +2909,13 @@ void LLAppViewer::requestQuit()
if( (LLStartUp::getStartupState() < STATE_STARTED) || !region )
{
+ // If we have a region, make some attempt to send a logout request first.
+ // This prevents the halfway-logged-in avatar from hanging around inworld for a couple minutes.
+ if(region)
+ {
+ sendLogoutRequest();
+ }
+
// Quit immediately
forceQuit();
return;
@@ -4012,7 +4019,10 @@ void LLAppViewer::sendLogoutRequest()
gLogoutMaxTime = LOGOUT_REQUEST_TIME;
mLogoutRequestSent = TRUE;
- LLVoiceClient::getInstance()->leaveChannel();
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->leaveChannel();
+ }
//Set internal status variables and marker files
gLogoutInProgress = TRUE;