Commit cb87ed29 authored by Max Kellermann's avatar Max Kellermann

input/tidal: invoke login handlers on second request

Fixes a freeze bug.
parent 570c6765
...@@ -47,7 +47,10 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept ...@@ -47,7 +47,10 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
const bool was_empty = handlers.empty(); const bool was_empty = handlers.empty();
handlers.push_front(h); handlers.push_front(h);
if (was_empty && session.empty() && !login_request) { if (!was_empty || login_request)
return;
if (session.empty()) {
// TODO: throttle login attempts? // TODO: throttle login attempts?
std::string login_uri(base_url); std::string login_uri(base_url);
...@@ -66,7 +69,8 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept ...@@ -66,7 +69,8 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
ScheduleInvokeHandlers(); ScheduleInvokeHandlers();
return; return;
} }
} } else
ScheduleInvokeHandlers();
} }
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment