mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
Mercury should not reconnect when stopped
This commit is contained in:
@@ -9,7 +9,7 @@ std::map<MercuryType, std::string> MercuryTypeMap({
|
|||||||
{MercuryType::UNSUB, "UNSUB"},
|
{MercuryType::UNSUB, "UNSUB"},
|
||||||
});
|
});
|
||||||
|
|
||||||
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 4 * 1024, +1, 1)
|
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 8 * 1024, +1, 1)
|
||||||
{
|
{
|
||||||
this->timeProvider = std::make_shared<TimeProvider>();
|
this->timeProvider = std::make_shared<TimeProvider>();
|
||||||
this->callbacks = std::map<uint64_t, mercuryCallback>();
|
this->callbacks = std::map<uint64_t, mercuryCallback>();
|
||||||
@@ -162,8 +162,8 @@ void MercuryManager::runTask()
|
|||||||
catch (const std::runtime_error& e)
|
catch (const std::runtime_error& e)
|
||||||
{
|
{
|
||||||
// Reconnection required
|
// Reconnection required
|
||||||
this->reconnect();
|
if (isRunning) this->reconnect();
|
||||||
this->reconnectedCallback();
|
if (isRunning) 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
|
||||||
|
|||||||
Reference in New Issue
Block a user