Say it when a live launch has no DHP sign-in on this PC
The dev drive on another PC still showed no live aircraft after ce36cf0. Its
API log, on the drive: "now LIVE on the DHP (the DHP answered, but this PC has
no DHP sign-in yet)". The operator in launcher.json travels with the drive; the
DHP sign-in lives in that PC's Credential Manager and does not. So the launcher
launched as the drive's operator, wrote an empty upstream.token, and the API
and the tile server served the drive's own data - with nothing in the launcher's
window to say why.
run_stack now logs, when live mode has no token: no DHP sign-in on this PC, what
that costs (no live aircraft, no site tiles), and to stop ODIAN and sign in,
per PC.
This commit is contained in:
@@ -2164,7 +2164,23 @@ impl Launcher {
|
||||
// comes up on the DHP's data instead of switching a moment later.
|
||||
let live_mode = config.upstream_url.is_some();
|
||||
if live_mode {
|
||||
let token = self.site_access_token(app).await.ok();
|
||||
let token = match self.site_access_token(app).await {
|
||||
Ok(token) => Some(token),
|
||||
Err(why) => {
|
||||
// Said out loud: the operator named in launcher.json travels with a drive, the
|
||||
// sign-in (Credential Manager) does not. A drive moved to another PC launches
|
||||
// there as its operator and quietly shows that PC's data - the API's log was the
|
||||
// only place that said "no DHP sign-in yet".
|
||||
self.log(
|
||||
app,
|
||||
"warn",
|
||||
format!(
|
||||
"No DHP sign-in on this PC ({why}): ODIAN shows this PC's own data - no live aircraft, no tiles from the site. Stop ODIAN and sign in; a sign-in is kept per PC, so a drive moved to another one needs it there too."
|
||||
),
|
||||
);
|
||||
None
|
||||
}
|
||||
};
|
||||
self.write_upstream_token(&config.layout, token.as_deref());
|
||||
} else {
|
||||
// No upstream means none: a token left behind by a run that ended without clearing
|
||||
|
||||
Reference in New Issue
Block a user