Fix bug in JobEngine where an attempt to restart after stop would trigger an exception because the cancellation source was not recreated.

inv-download
Justin Clark-Casey (justincc) 2015-02-04 00:10:13 +00:00
parent 1d2616e7a2
commit 6834393821
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,7 @@ namespace OpenSim.Framework.Monitoring
private BlockingCollection<Job> m_jobQueue;
private CancellationTokenSource m_cancelSource = new CancellationTokenSource();
private CancellationTokenSource m_cancelSource;
/// <summary>
/// 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<Job>(new ConcurrentQueue<Job>(), 5000);
m_cancelSource = new CancellationTokenSource();
WorkManager.StartThread(
ProcessRequests,