From 6eab9e63f6b4ce3b94878b0a9aa82aca5237ae2e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 3 Mar 2026 19:49:38 +0200 Subject: #5084 Convert watchdog to a simpleton --- indra/llcommon/llwatchdog.cpp | 2 +- indra/llcommon/llwatchdog.h | 6 +++--- indra/newview/llappviewer.cpp | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/llcommon/llwatchdog.cpp b/indra/llcommon/llwatchdog.cpp index 1bc1283d0b..d3242a6c96 100644 --- a/indra/llcommon/llwatchdog.cpp +++ b/indra/llcommon/llwatchdog.cpp @@ -87,7 +87,7 @@ void LLWatchdogEntry::start() void LLWatchdogEntry::stop() { // this can happen very late in the shutdown sequence - if (!LLWatchdog::wasDeleted()) + if (LLWatchdog::instanceExists()) { LLWatchdog::getInstance()->remove(this); } diff --git a/indra/llcommon/llwatchdog.h b/indra/llcommon/llwatchdog.h index fded881bb8..2100a90879 100644 --- a/indra/llcommon/llwatchdog.h +++ b/indra/llcommon/llwatchdog.h @@ -83,12 +83,12 @@ private: }; class LLWatchdogTimerThread; // Defined in the cpp -class LLWatchdog : public LLSingleton +class LLWatchdog : public LLSimpleton { - LLSINGLETON(LLWatchdog); +public: + LLWatchdog(); ~LLWatchdog(); -public: // Add an entry to the watchdog. void add(LLWatchdogEntry* e); void remove(LLWatchdogEntry* e); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bae9749772..20dba648fd 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1240,6 +1240,7 @@ bool LLAppViewer::init() // TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement // some other protection to make sure we don't use network before initializng proxy + LLWatchdog::createInstance(); /*----------------------------------------------------------------------*/ // nat 2016-06-29 moved the following here from the former mainLoop(). mMainloopTimeout = new LLWatchdogTimeout("mainloop"); -- cgit v1.3