aboutsummaryrefslogtreecommitdiffstats
path: root/src/state/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/mod.rs')
-rw-r--r--src/state/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index a2da643..2fbfd31 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -161,6 +161,9 @@ pub(crate) struct AppState {
/// (`api::login::end_session`). This node refuses their tokens; others take them
/// until they expire, and so does this one after a restart.
pub(crate) ended_sessions: Arc<std::sync::Mutex<std::collections::BTreeMap<String, u64>>>,
+ /// Woken when a session ends on this node (`ended_sessions`): streams opened with
+ /// its tokens end (`api::login::streams_end`).
+ pub(crate) session_ended: Arc<tokio::sync::Notify>,
pub(crate) token_lifetime: Duration,
pub(crate) session_lifetime: Duration,
/// How long a challenge to log in by key is valid, and how many logins by key a user