input/tidal: invoke login handlers on second request

Fixes a freeze bug.
This commit is contained in:
Max Kellermann 2018-01-21 12:41:19 +01:00
parent 570c6765b0
commit cb87ed29d8
1 changed files with 6 additions and 2 deletions

View File

@ -47,7 +47,10 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
const bool was_empty = handlers.empty();
handlers.push_front(h);
if (was_empty && session.empty() && !login_request) {
if (!was_empty || login_request)
return;
if (session.empty()) {
// TODO: throttle login attempts?
std::string login_uri(base_url);
@ -66,7 +69,8 @@ TidalSessionManager::AddLoginHandler(TidalSessionHandler &h) noexcept
ScheduleInvokeHandlers();
return;
}
}
} else
ScheduleInvokeHandlers();
}
void