diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-05-04 17:16:12 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-05-04 17:16:12 -0400 |
commit | a4467e9ffe9dc378451d7bb6b8c70f6c0c42a814 (patch) | |
tree | c6a918a0a3a0d7e1117ca71bfc966e3d6cd4b5ea /indra/viewer_components/updater/llupdaterservice.cpp | |
parent | 1f2fcc12980dd21659bce493431b7a1b3fe2ef00 (diff) | |
parent | 07ec10781e45b3d92e27e92ddad39cf74fa7ff0b (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer64-c-11
Diffstat (limited to 'indra/viewer_components/updater/llupdaterservice.cpp')
-rw-r--r-- | indra/viewer_components/updater/llupdaterservice.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 1665e41e70..df021948c3 100644 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -158,7 +158,8 @@ public: private: std::string mNewChannel; std::string mNewVersion; - + LLTempBoundListener mMainLoopConnection; + void restartTimer(unsigned int seconds); void setState(LLUpdaterService::eUpdaterState state); void stopTimer(); @@ -179,7 +180,8 @@ LLUpdaterServiceImpl::LLUpdaterServiceImpl() : LLUpdaterServiceImpl::~LLUpdaterServiceImpl() { LL_INFOS("UpdaterService") << "shutting down updater service" << LL_ENDL; - LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName); + // Destroying an LLTempBoundListener implicitly disconnects. That's its + // whole purpose. } void LLUpdaterServiceImpl::initialize(const std::string& channel, @@ -560,7 +562,7 @@ void LLUpdaterServiceImpl::restartTimer(unsigned int seconds) seconds << " seconds" << LL_ENDL; mTimer.start(); mTimer.setTimerExpirySec((F32)seconds); - LLEventPumps::instance().obtain("mainloop").listen( + mMainLoopConnection = LLEventPumps::instance().obtain("mainloop").listen( sListenerName, boost::bind(&LLUpdaterServiceImpl::onMainLoop, this, _1)); } @@ -589,7 +591,7 @@ void LLUpdaterServiceImpl::setState(LLUpdaterService::eUpdaterState state) void LLUpdaterServiceImpl::stopTimer() { mTimer.stop(); - LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName); + mMainLoopConnection.disconnect(); } bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event) |