mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: notification can not notify frontend (#5243)
This commit is contained in:
@@ -73,6 +73,7 @@
|
|||||||
- 修复首页自定义卡片在切换轻量模式时失效
|
- 修复首页自定义卡片在切换轻量模式时失效
|
||||||
- 修复悬浮跳转导航失效
|
- 修复悬浮跳转导航失效
|
||||||
- 修复小键盘热键映射错误
|
- 修复小键盘热键映射错误
|
||||||
|
- 修复后端无法通知前端事件
|
||||||
|
|
||||||
## v2.4.2
|
## v2.4.2
|
||||||
|
|
||||||
|
|||||||
@@ -96,10 +96,17 @@ impl NotificationSystem {
|
|||||||
let handle = Handle::global();
|
let handle = Handle::global();
|
||||||
|
|
||||||
while !handle.is_exiting() {
|
while !handle.is_exiting() {
|
||||||
match rx.recv_timeout(std::time::Duration::from_millis(100)) {
|
match rx.recv() {
|
||||||
Ok(event) => Self::process_event(handle, event),
|
Ok(event) => Self::process_event(handle, event),
|
||||||
Err(mpsc::RecvTimeoutError::Disconnected) => break,
|
Err(e) => {
|
||||||
Err(mpsc::RecvTimeoutError::Timeout) => break,
|
logging!(
|
||||||
|
error,
|
||||||
|
Type::System,
|
||||||
|
"receive event error, stop notification worker: {}",
|
||||||
|
e
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user