mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 23:56:43 +02:00
Fix data race
This commit is contained in:
parent
8067394212
commit
e6872593ee
3 changed files with 11 additions and 5 deletions
|
@ -84,6 +84,7 @@ void StreamServer::onChunkEncoded(const PcmStream* pcmStream, bool isDefaultStre
|
|||
{
|
||||
if (!settings_.stream.sendAudioToMutedClients)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(clientMutex_);
|
||||
GroupPtr group = Config::instance().getGroupFromClient(session->clientId);
|
||||
if (group)
|
||||
{
|
||||
|
@ -93,7 +94,6 @@ void StreamServer::onChunkEncoded(const PcmStream* pcmStream, bool isDefaultStre
|
|||
}
|
||||
else
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(clientMutex_);
|
||||
ClientInfoPtr client = group->getClient(session->clientId);
|
||||
if (client && client->config.volume.muted)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue