Backported from Viewer-Dev (14028 (1be62434c3a6) Fix for EXP-201 -- "Clean shutdown")

meow-7.2.2
Tank_Master 2011-02-11 22:39:25 -08:00
parent 1344701246
commit caa1b93fd4
1 changed files with 11 additions and 1 deletions

View File

@ -3048,6 +3048,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;
@ -4165,7 +4172,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;