diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs index e26a6f28ad..4847675b68 100644 --- a/OpenSim/Framework/Watchdog.cs +++ b/OpenSim/Framework/Watchdog.cs @@ -126,8 +126,7 @@ namespace OpenSim.Framework thread.Name = name; thread.Priority = priority; thread.IsBackground = isBackground; - thread.Start(); - + ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout); m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")"); @@ -135,6 +134,8 @@ namespace OpenSim.Framework lock (m_threads) m_threads.Add(twi.Thread.ManagedThreadId, twi); + thread.Start(); + return thread; }