input/tidal: invoke login handlers on second request
Fixes a freeze bug.
This commit is contained in:
@@ -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
|
|||||||
ScheduleInvokeHandlers();
|
ScheduleInvokeHandlers();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
ScheduleInvokeHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user