Skip to content

Commit 29f06f6

Browse files
committed
Update tray initialization failure message with actual retry interval
1 parent d2b9bfe commit 29f06f6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

autogit-daemon/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ async fn main() -> Result<()> {
9393
// Check if tray is enabled in config
9494
let enable_tray = config.read().await.daemon.enable_tray;
9595
let initial_tray = if enable_tray {
96-
let repo_count = config.read().await.repositories.len();
96+
let cfg = config.read().await;
97+
let repo_count = cfg.repositories.len();
98+
let check_interval = cfg.daemon.check_interval_seconds;
99+
drop(cfg);
100+
97101
let tray = tray::AutogitTray::new(repo_count, tray_action_tx.clone(), suspended.clone());
98102
match tray.spawn_tray().await {
99103
Ok(handle) => {
@@ -102,7 +106,7 @@ async fn main() -> Result<()> {
102106
}
103107
Err(e) => {
104108
warn!("Failed to spawn system tray icon (no desktop environment?): {:#}", e);
105-
warn!("Daemon will continue without tray icon");
109+
warn!("Will retry tray initialization up to 3 times (every {} seconds)", check_interval);
106110
None
107111
}
108112
}

0 commit comments

Comments
 (0)