diff options
| author | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-09-17 23:52:56 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-17 23:52:56 +0300 |
| commit | f767219366b8dbaeea95a22bd9953a587f473298 (patch) | |
| tree | a7391284f314eaf24e9684a573af7e80a0dd38ba /indra/newview/llviewerwindow.cpp | |
| parent | 9bc42804f6f574d24467ee9f56e7e67d268f0c61 (diff) | |
Revert #5856 OS hibernation prevention (#6340)
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 637c03cdaa..5e06010012 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1485,30 +1485,12 @@ void LLViewerWindow::handleCloseRequestCanceled() void LLViewerWindow::handleSuspendRequest() { - static LLCachedControl<S32> os_hibernation_mode(gSavedSettings, "OSHibernationMode", 0); - if (os_hibernation_mode == 0) - { - LL_INFOS() << "Got a 'suspend' event from OS" << LL_ENDL; - // Viewer doesn't handle hibernation. - // Just send statistics. - LLAppViewer::instance()->sendViewerStatistics(false); - } - else - { - LL_INFOS() << "Got a 'suspend' event from OS, disconnecting" << LL_ENDL; - // Viewer is set to prevent hibernation if agent isn't away. - // If we got here, likely Agent 'went' away then viewer got - // a hibernation message. - // We have a limited timeframe. Sends stats then disconnect. - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - LLAppViewer::instance()->sendViewerStatistics(true); - LLAppViewer::instance()->metricsSend(!gDisconnected); - // Make sure to show a message. - LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected")); - } - } + LLAppViewer::instance()->sendViewerStatistics(false); + // Todo: this should send a disconnect request as viewer + // can't keep heartbeat up while suspended and will get + // disconnected within a minute. + // Add a disconnect here once 'prevent OS from sleeping' + // feature is ready. } bool LLViewerWindow::handleCloseRequest(LLWindow *window, bool from_user) |
