diff --git a/crates/tor-chanmgr/src/mgr/map.rs b/crates/tor-chanmgr/src/mgr/map.rs index 2b3ebb50e..295e7fac6 100644 --- a/crates/tor-chanmgr/src/mgr/map.rs +++ b/crates/tor-chanmgr/src/mgr/map.rs @@ -344,6 +344,18 @@ impl ChannelMap { nde }; + let mut inner = self + .inner + .lock() + .map_err(|_| internal!("poisonned channel manager"))?; + + if let Some(new_config) = new_config { + inner.config = new_config.clone(); + } + if let Some(new_dormancy) = new_dormancy { + inner.dormancy = new_dormancy; + } + let padding_parameters = { let mut p = PaddingParametersBuilder::default(); update_padding_parameters_from_netdir(&mut p, &netdir).unwrap_or_else(|e| { @@ -359,18 +371,6 @@ impl ChannelMap { p }; - let mut inner = self - .inner - .lock() - .map_err(|_| internal!("poisonned channel manager"))?; - - if let Some(new_config) = new_config { - inner.config = new_config.clone(); - } - if let Some(new_dormancy) = new_dormancy { - inner.dormancy = new_dormancy; - } - let update = inner .channels_params .start_update()