From 68343938215a438cd446a7db819a4f7d93ccacd4 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 4 Feb 2015 00:10:13 +0000 Subject: [PATCH] Fix bug in JobEngine where an attempt to restart after stop would trigger an exception because the cancellation source was not recreated. --- OpenSim/Framework/Monitoring/JobEngine.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs index 44f5d9a9d7..a32e4aa58e 100644 --- a/OpenSim/Framework/Monitoring/JobEngine.cs +++ b/OpenSim/Framework/Monitoring/JobEngine.cs @@ -78,7 +78,7 @@ namespace OpenSim.Framework.Monitoring private BlockingCollection m_jobQueue; - private CancellationTokenSource m_cancelSource = new CancellationTokenSource(); + private CancellationTokenSource m_cancelSource; /// /// Used to signal that we are ready to complete stop. @@ -105,6 +105,7 @@ namespace OpenSim.Framework.Monitoring m_finishedProcessingAfterStop.Reset(); m_jobQueue = new BlockingCollection(new ConcurrentQueue(), 5000); + m_cancelSource = new CancellationTokenSource(); WorkManager.StartThread( ProcessRequests,