diff options
author | Max Kellermann <max@musicpd.org> | 2017-01-23 19:25:30 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-01-23 19:25:30 +0100 |
commit | 678524ad2109853be9ecc682f2ad7017794c6222 (patch) | |
tree | f1b534def770e38e5bbd6b2b4683bf6b51de1031 /src | |
parent | 32a64481f22cb69c89ec0a34d5d556225ea61f4f (diff) |
lib/upnp/WorkQueue: fix race condition
With "ok==false", newly created threads may quit instantly.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/upnp/WorkQueue.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/upnp/WorkQueue.hxx b/src/lib/upnp/WorkQueue.hxx index 1144634f0..b503e9956 100644 --- a/src/lib/upnp/WorkQueue.hxx +++ b/src/lib/upnp/WorkQueue.hxx @@ -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; } |