mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 15:06:14 -05:00
feat: add brokered macOS service mode
This commit is contained in:
21 files changed
+642
-1426
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user