From d412c1b0eb002b9ad5e6fc7aa1e01ea8f3725618 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 14 Jun 2013 23:53:20 +0100 Subject: Don't try to abort worker threads in WebFetchInvDescModule if module was not enabled. This also moves the abort to RemoveRegion() rather than a destructor. --- .../Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index d1afff2..2024018 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -116,6 +116,10 @@ namespace OpenSim.Region.ClientStack.Linden m_scene.EventManager.OnRegisterCaps -= RegisterCaps; m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps; + + foreach (Thread t in m_workerThreads) + Watchdog.AbortThread(t.ManagedThreadId); + m_scene = null; } @@ -165,12 +169,6 @@ namespace OpenSim.Region.ClientStack.Linden #endregion - ~WebFetchInvDescModule() - { - foreach (Thread t in m_workerThreads) - Watchdog.AbortThread(t.ManagedThreadId); - } - private class PollServiceInventoryEventArgs : PollServiceEventArgs { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); -- cgit v1.1