From b349c003e8bdc57451edec8c909fbb43c16b9fee Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Sun, 25 Oct 2020 12:29:01 +0100 Subject: [PATCH] make file reloading faster --- src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 5f79d4b..257a7f6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -117,7 +117,7 @@ fn run_filewatch_thread>( evt_send: glib::Sender, ) -> Result { log::info!("Initializing config file watcher"); - let mut hotwatch = hotwatch::Hotwatch::new()?; + let mut hotwatch = hotwatch::Hotwatch::new_with_custom_delay(std::time::Duration::from_millis(500))?; let config_file_change_send = evt_send.clone(); hotwatch.watch_file_changes(config_file_path, move |path| {