From e6666d92d81641875ace3a589b88a779a256f3fd Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 21 Jul 2023 13:28:08 -0700 Subject: [PATCH] don't unwrap if config cant send --- web3_proxy/src/sub_commands/proxyd.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/sub_commands/proxyd.rs b/web3_proxy/src/sub_commands/proxyd.rs index f61b4e73..f14f3fb7 100644 --- a/web3_proxy/src/sub_commands/proxyd.rs +++ b/web3_proxy/src/sub_commands/proxyd.rs @@ -123,8 +123,10 @@ impl ProxydSubCommand { // TODO: print the differences // TODO: first run seems to always see differences. why? info!("config @ {:?} changed", top_config_path); - config_sender.send(new_top_config.clone()).unwrap(); - current_config = new_top_config; + match config_sender.send(new_top_config.clone()) { + Ok(()) => current_config = new_top_config, + Err(err) => error!(?err, "unable to apply new config"), + } } } Err(err) => {