mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-29 22:00:54 +03:00
lock syntax error
This commit is contained in:
@@ -149,7 +149,7 @@ RECONNECT:
|
|||||||
|
|
||||||
void MercuryManager::runTask()
|
void MercuryManager::runTask()
|
||||||
{
|
{
|
||||||
std::scoped_lock(this->runningMutex);
|
std::scoped_lock lock(this->runningMutex);
|
||||||
// Listen for mercury replies and handle them accordingly
|
// Listen for mercury replies and handle them accordingly
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
while (isRunning)
|
while (isRunning)
|
||||||
@@ -161,9 +161,10 @@ void MercuryManager::runTask()
|
|||||||
}
|
}
|
||||||
catch (const std::runtime_error& e)
|
catch (const std::runtime_error& e)
|
||||||
{
|
{
|
||||||
|
if (!isRunning) break;
|
||||||
// Reconnection required
|
// Reconnection required
|
||||||
if (isRunning) this->reconnect();
|
this->reconnect();
|
||||||
if (isRunning) this->reconnectedCallback();
|
this->reconnectedCallback();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (static_cast<MercuryType>(packet->command) == MercuryType::PING) // @TODO: Handle time synchronization through ping
|
if (static_cast<MercuryType>(packet->command) == MercuryType::PING) // @TODO: Handle time synchronization through ping
|
||||||
@@ -191,7 +192,7 @@ void MercuryManager::stop() {
|
|||||||
CSPOT_LOG(debug, "Stopping mercury manager");
|
CSPOT_LOG(debug, "Stopping mercury manager");
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
audioChunkManager->close();
|
audioChunkManager->close();
|
||||||
std::scoped_lock(audioChunkManager->runningMutex, this->runningMutex);
|
std::scoped_lock lock(audioChunkManager->runningMutex, this->runningMutex);
|
||||||
CSPOT_LOG(debug, "mercury stopped");
|
CSPOT_LOG(debug, "mercury stopped");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user