mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
refactor: add the log plugin
This commit is contained in:
@@ -26,12 +26,6 @@ struct StatusHolder {
|
||||
|
||||
impl Default for StatusHolder {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl StatusHolder {
|
||||
fn new() -> Self {
|
||||
let (status_tx, status_rx) = watch::channel(VpnStatus::Disconnected);
|
||||
|
||||
Self {
|
||||
@@ -40,7 +34,9 @@ impl StatusHolder {
|
||||
status_rx,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StatusHolder {
|
||||
fn set(&mut self, status: VpnStatus) {
|
||||
self.status = status;
|
||||
if let Err(err) = self.status_tx.send(status) {
|
||||
|
Reference in New Issue
Block a user