diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6c25ba1a4b..3726226246 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5092,19 +5092,16 @@ void LLAppViewer::idle() } } - // AO: setting to quit after N seconds of being AFK. Note: Server will time us out after 30m regardless + // setting to quit after N seconds of being AFK. Note: Server will time us out after 30m regardless static LLCachedControl quitAfterSecondsOfAFK(gSavedSettings, "QuitAfterSecondsOfAFK"); F32 qas_afk = (F32)quitAfterSecondsOfAFK; - if ((qas_afk > 0.f) && (gAgent.getAFK())) + if (!mQuitRequested && qas_afk > 0.f && gAgent.getAFK() && gAwayTimer.getElapsedTimeF32() > qas_afk) { - // idle time is more than setting - if (gAwayTimer.getElapsedTimeF32() > qas_afk ) - { - // go ahead and just quit gracefully - llinfos << "Logout, QuitAfterSecondsAFK expired." << llendl; - LLAppViewer::instance()->requestQuit(); - } + // go ahead and just quit gracefully + llinfos << "Logout, QuitAfterSecondsAFK expired." << llendl; + LLAppViewer::instance()->requestQuit(); } + // // Must wait until both have avatar object and mute list, so poll // here.