Fixed a minor race where the thread could start before the worker is initialized. (#5817)

This commit is contained in:
Kenneth Skovhede
2024-12-28 19:58:20 +01:00
committed by GitHub
parent 8f853cfa7f
commit 22bdcecfd4
+1 -1
View File
@@ -94,8 +94,8 @@ namespace Duplicati.Server
/// <param name="worker">The worker thread</param>
public void Init(WorkerThread<Runner.IRunnerData> worker)
{
m_thread = new Thread(new ThreadStart(Runner));
m_worker = worker;
m_thread = new Thread(new ThreadStart(Runner));
m_worker.CompletedWork += OnCompleted;
m_worker.StartingWork += OnStartingWork;
m_schedule = new KeyValuePair<DateTime, ISchedule>[0];