1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix(tray): crash caused by excess updates

Some icons seem to absolutely spam updates in some circumstances. Increasing the channel size by 4x seems sufficient to prevent this.
This commit is contained in:
Jake Stanger 2024-01-27 00:35:16 +00:00
parent 8aef093ac9
commit 8016ec256d
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -25,7 +25,7 @@ impl TrayEventReceiver {
let id = format!("ironbar-{}", Ironbar::unique_id());
let (tx, rx) = mpsc::channel(16);
let (b_tx, b_rx) = broadcast::channel(16);
let (b_tx, b_rx) = broadcast::channel(64);
let tray = StatusNotifierWatcher::new(rx).await?;
let mut host = Box::pin(tray.create_notifier_host(&id)).await?;
@ -48,7 +48,7 @@ impl TrayEventReceiver {
item,
menu,
} => {
debug!("Adding item with address '{address}'");
debug!("Adding/updating item with address '{address}'");
tray.insert(address, (item, menu));
}
NotifierItemMessage::Remove { address } => {