Commit 678524ad authored by Max Kellermann's avatar Max Kellermann

lib/upnp/WorkQueue: fix race condition

With "ok==false", newly created threads may quit instantly.
parent 32a64481
......@@ -97,6 +97,7 @@ public:
assert(n_threads == 0);
assert(threads == nullptr);
ok = true;
n_threads = nworkers;
threads = new pthread_t[n_threads];
......@@ -109,7 +110,6 @@ public:
}
}
ok = true;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment