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