feat: add brokered macOS service mode

This commit is contained in:
Kevin Yue committed 2026-07-16 23:16:58 +08:00
1 parent ce97729984
commit 9c1428fb72
21 files changed
+642 -1426

No files matched your search

+16
View File
@@ -107,6 +107,22 @@ impl SessionRegistry {
Ok(credential)
}
pub fn is_empty(&self) -> bool {
let Ok(mut sessions) = self.sessions.lock() else {
return false;
};
let now = Instant::now();
sessions.retain(|_, record| {
!matches!(
record.status,
SessionStatus::Pending {
activation_deadline, ..
} if now > activation_deadline
)
});
sessions.is_empty()
}
pub fn begin_handshake(
self: &Arc<Self>,
service_instance_id: Uuid,