Indentation

This commit is contained in:
2025-09-28 23:35:20 -04:00
parent 20d568a063
commit 6cebf6856e
+24 -24
View File
@@ -27,24 +27,24 @@ timer(ioThread->getIoService())
void DeviceReattacher::start()
{
shouldContinue.store(true);
scheduleNextTimeout();
shouldContinue.store(true);
scheduleNextTimeout();
}
void DeviceReattacher::stop()
{
shouldContinue.store(false);
timer.cancel();
shouldContinue.store(false);
timer.cancel();
}
void DeviceReattacher::scheduleNextTimeout()
{
if (!shouldContinue.load()) {
return;
}
if (!shouldContinue.load()) {
return;
}
// Schedule the next timeout using the configured period
timer.expires_from_now(
// Schedule the next timeout using the configured period
timer.expires_from_now(
boost::posix_time::milliseconds(
CONFIG_MRNTT_DEVMGR_REATTACHER_PERIOD_MS));
@@ -56,27 +56,27 @@ void DeviceReattacher::onTimeout(const boost::system::error_code& error)
{
// Timer was cancelled, which is expected when stopping
if (error == boost::asio::error::operation_aborted) {
return;
}
return;
}
if (error)
if (error)
{
std::cerr << "DeviceReattacher: Timer error: " << error.message()
std::cerr << "DeviceReattacher: Timer error: " << error.message()
<< std::endl;
return;
}
return;
}
if (!shouldContinue.load()) {
return;
}
if (!shouldContinue.load()) {
return;
}
// Attempt to reattach all unattached devices from the known list
parent.attachAllUnattachedDevicesFromKnownListReq(
Callback<DeviceManager::attachAllUnattachedDevicesFromReqCbFn>(
nullptr, reattachmentCb));
// Attempt to reattach all unattached devices from the known list
parent.attachAllUnattachedDevicesFromKnownListReq(
Callback<DeviceManager::attachAllUnattachedDevicesFromReqCbFn>(
nullptr, reattachmentCb));
// Schedule the next timeout
scheduleNextTimeout();
// Schedule the next timeout
scheduleNextTimeout();
}
} // namespace device