Fixed assert/potential bug when aborting podcast sync while being throttled

This commit is contained in:
emeric
2025-09-14 13:20:43 +02:00
parent 98b7e6c542
commit 95bc649fc1
+2 -2
View File
@@ -313,7 +313,7 @@ namespace lms::core::http
LOG(DEBUG, "Throttling for " << duration.count() << " seconds"); LOG(DEBUG, "Throttling for " << duration.count() << " seconds");
_throttleTimer.expires_after(duration); _throttleTimer.expires_after(duration);
_throttleTimer.async_wait([this](const boost::system::error_code& ec) { _throttleTimer.async_wait(boost::asio::bind_executor(_strand, [this](const boost::system::error_code& ec) {
if (ec == boost::asio::error::operation_aborted) if (ec == boost::asio::error::operation_aborted)
LOG(DEBUG, "Throttle aborted"); LOG(DEBUG, "Throttle aborted");
else if (ec) else if (ec)
@@ -322,7 +322,7 @@ namespace lms::core::http
setState(State::Idle); setState(State::Idle);
if (!ec) if (!ec)
sendNextQueuedRequest(); sendNextQueuedRequest();
}); }));
setState(State::Throttled); setState(State::Throttled);
} }