minor tweaks to TEARDOWN logging

*   log everything from the retina::client::teardown module so the
    log level can be tweaked separately.
*   log when the session is expired.
This commit is contained in:
Scott Lamb 2021-09-27 16:03:26 -07:00
parent f682d752a2
commit 6ee24e1c0e
2 changed files with 7 additions and 3 deletions

View File

@ -1752,7 +1752,6 @@ impl PinnedDrop for SessionInner {
}
};
log::debug!("Starting background TEARDOWN for {}", &*session.id);
handle.spawn(teardown::background_teardown(
seqnum,
this.presentation.base_url.clone(),

View File

@ -24,7 +24,8 @@ pub(super) async fn background_teardown(
mut tx: tokio::sync::watch::Sender<Option<Result<(), Error>>>,
expires: tokio::time::Instant,
) {
let _ = tokio::time::timeout_at(
log::debug!("TEARDOWN {} starting", &*session_id);
if tokio::time::timeout_at(
expires,
teardown_loop_forever(
base_url,
@ -35,7 +36,11 @@ pub(super) async fn background_teardown(
&mut tx,
),
)
.await;
.await
.is_err()
{
log::debug!("TEARDOWN {} aborted on session expiration", &*session_id);
}
if let Some(ref session_group) = options.session_group {
let seqnum = seqnum.expect("seqnum specified when session_group exists");
let mut l = session_group.0.lock().unwrap();